Fixed log message trunction on Windows.
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 21 Oct 2008 13:29:42 +0000 (15:29 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 21 Oct 2008 13:29:42 +0000 (15:29 +0200)
src/snprintf.c
win/makefile

index 0221f97..a3903ed 100644 (file)
@@ -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);
 #else
 #ifdef WIN32
-    _vsnprintf(buf, size, fmt, ap);
+    _vsnprintf(buf, size-1, fmt, ap);
+    buf[size-1] = '\0';
 #else
     vsprintf(buf, fmt, ap);
 #endif
 #else
     vsprintf(buf, fmt, ap);
 #endif
index bced029..8bbd1e9 100644 (file)
@@ -6,7 +6,7 @@
 
 # Parameters 
 
 
 # Parameters 
 
-DEBUG=0   # 0 for release, 1 for debug
+DEBUG=1   # 0 for release, 1 for debug
 USE_MANIFEST = 0
 
 # TCL
 USE_MANIFEST = 0
 
 # TCL