[Box Backup-commit] COMMIT r985 - box/trunk/lib/common
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Thu, 12 Oct 2006 21:53:55 +0100
Author: chris
Date: 2006-10-12 21:53:55 +0100 (Thu, 12 Oct 2006)
New Revision: 985
Modified:
box/trunk/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.
Modified: box/trunk/lib/common/FdGetLine.h
===================================================================
--- box/trunk/lib/common/FdGetLine.h 2006-10-12 20:53:23 UTC (rev 984)
+++ box/trunk/lib/common/FdGetLine.h 2006-10-12 20:53:55 UTC (rev 985)
@@ -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