From 2ba84b155219d5d18eed5ba4d929c12abdb88f14 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 21 Oct 2008 15:29:42 +0200 Subject: [PATCH] Fixed log message trunction on Windows. --- src/snprintf.c | 3 ++- win/makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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 -- 1.7.10.4