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, ...)
{
va_list argptr;
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];
#else
char *str;
......@@ -672,7 +672,7 @@ int ciolib_cprintf(char *fmat, ...)
CIOLIB_INIT();
va_start(argptr,fmat);
#ifdef _WIN32
#ifdef _MSC_VER
ret=_vsnprintf(str,sizeof(str)-1,fmat,argptr);
#else
ret=vsnprintf(NULL,0,fmat,argptr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment