From: Adam Dickmeiss Date: Tue, 21 Oct 2008 13:29:42 +0000 (+0200) Subject: Fixed log message trunction on Windows. X-Git-Tag: v3.0.38~16 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=2ba84b155219d5d18eed5ba4d929c12abdb88f14;p=yaz-moved-to-github.git Fixed log message trunction on Windows. --- diff --git a/src/snprintf.c b/src/snprintf.c index 0221f97..a3903ed 100644 --- a/src/snprintf.c +++ b/src/snprintf.c @@ -17,7 +17,8 @@ void yaz_vsnprintf(char *buf, size_t size, const char *fmt, va_list ap) vsnprintf(buf, size, fmt, ap); #else #ifdef WIN32 - _vsnprintf(buf, size, fmt, ap); + _vsnprintf(buf, size-1, fmt, ap); + buf[size-1] = '\0'; #else vsprintf(buf, fmt, ap); #endif diff --git a/win/makefile b/win/makefile index bced029..8bbd1e9 100644 --- a/win/makefile +++ b/win/makefile @@ -6,7 +6,7 @@ # Parameters -DEBUG=0 # 0 for release, 1 for debug +DEBUG=1 # 0 for release, 1 for debug USE_MANIFEST = 0 # TCL