version 1.4.38b
[polyglot.git] / util.h
diff --git a/util.h b/util.h
index 2b0886c..dd3ed59 100644 (file)
--- a/util.h
+++ b/util.h
 \r
 #define FormatBufferSize 4096\r
 \r
+#ifdef _MSC_VER\r
+#define vsnprintf _vsnprintf\r
+#endif\r
+\r
 #define CONSTRUCT_ARG_STRING(format,buf)                                 \\r
     {                                                                    \\r
         va_list arg_list;                                                \\r
@@ -77,7 +81,7 @@
                           format,                                        \\r
                           arg_list);                                     \\r
         va_end(arg_list);                                                \\r
-        buf[sizeof(buf)]='\0';                                           \\r
+        buf[sizeof(buf)-1]='\0';                                         \\r
         if(written>=sizeof(buf) || written<0){                           \\r
            my_fatal("write_buffer overflow: file \"%s\", line %d\n",     \\r
                    __FILE__,__LINE__);                                   \\r