snprintf porting fix for Visual Studio 2003
This commit is contained in:
parent
2f79874c30
commit
6b7fc9f116
@ -16,7 +16,11 @@ int _TIFF_vsnprintf_f(char* str, size_t size, const char* format, va_list ap)
|
|||||||
int count = -1;
|
int count = -1;
|
||||||
|
|
||||||
if (size != 0)
|
if (size != 0)
|
||||||
|
#if _MSC_VER <= 1310
|
||||||
|
count = _vsnprintf(str, size, format, ap);
|
||||||
|
#else
|
||||||
count = _vsnprintf_s(str, size, _TRUNCATE, format, ap);
|
count = _vsnprintf_s(str, size, _TRUNCATE, format, ap);
|
||||||
|
#endif
|
||||||
if (count == -1)
|
if (count == -1)
|
||||||
count = _vscprintf(format, ap);
|
count = _vscprintf(format, ap);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user