[Box Backup-dev] COMMIT r887 - box/chris/merge/lib/common
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Thu, 31 Aug 2006 23:29:31 +0100
Author: chris
Date: 2006-08-31 23:29:31 +0100 (Thu, 31 Aug 2006)
New Revision: 887
Modified:
box/chris/merge/lib/common/FdGetLine.h
Log:
Make FDGETLINE_BUFFER_SIZE big enough for one unicode character on Win32,
otherwise reading from console can fail due to insufficient buffer size.
(refs #3)
Modified: box/chris/merge/lib/common/FdGetLine.h
===================================================================
--- box/chris/merge/lib/common/FdGetLine.h 2006-08-31 22:28:35 UTC (rev 886)
+++ box/chris/merge/lib/common/FdGetLine.h 2006-08-31 22:29:31 UTC (rev 887)
@@ -14,6 +14,10 @@
#ifdef NDEBUG
#define FDGETLINE_BUFFER_SIZE 1024
+#elif defined WIN32
+ // need enough space for at least one unicode character
+ // in UTF-8 when calling console_read() from bbackupquery
+ #define FDGETLINE_BUFFER_SIZE 5
#else
#define FDGETLINE_BUFFER_SIZE 4
#endif