From 6b7fc9f116a86d97ee8bc126b102faa8189f2b71 Mon Sep 17 00:00:00 2001 From: Bob Friesenhahn Date: Sun, 18 Nov 2018 20:25:17 -0600 Subject: [PATCH] snprintf porting fix for Visual Studio 2003 --- port/snprintf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/port/snprintf.c b/port/snprintf.c index 1c4ac087..3542ab75 100644 --- a/port/snprintf.c +++ b/port/snprintf.c @@ -16,7 +16,11 @@ int _TIFF_vsnprintf_f(char* str, size_t size, const char* format, va_list ap) int count = -1; if (size != 0) +#if _MSC_VER <= 1310 + count = _vsnprintf(str, size, format, ap); +#else count = _vsnprintf_s(str, size, _TRUNCATE, format, ap); +#endif if (count == -1) count = _vscprintf(format, ap);