Skip to content
Snippets Groups Projects
Commit cfba23b5 authored by deuce's avatar deuce
Browse files

Borland acts like *nix in vsnprintf() if len is 0 (Hooray!)

parent 21b1f01d
No related branches found
No related tags found
No related merge requests found
...@@ -663,7 +663,7 @@ int ciolib_cprintf(char *fmat, ...) ...@@ -663,7 +663,7 @@ int ciolib_cprintf(char *fmat, ...)
{ {
va_list argptr; va_list argptr;
int ret; int ret;
#ifdef _WIN32 /* Can't figure out a way to allocate a "big enough" buffer for Win32. */ #ifdef _MSC_VER /* Can't figure out a way to allocate a "big enough" buffer for Win32. */
char str[16384]; char str[16384];
#else #else
char *str; char *str;
...@@ -672,7 +672,7 @@ int ciolib_cprintf(char *fmat, ...) ...@@ -672,7 +672,7 @@ int ciolib_cprintf(char *fmat, ...)
CIOLIB_INIT(); CIOLIB_INIT();
va_start(argptr,fmat); va_start(argptr,fmat);
#ifdef _WIN32 #ifdef _MSC_VER
ret=_vsnprintf(str,sizeof(str)-1,fmat,argptr); ret=_vsnprintf(str,sizeof(str)-1,fmat,argptr);
#else #else
ret=vsnprintf(NULL,0,fmat,argptr); ret=vsnprintf(NULL,0,fmat,argptr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment