stb_sprintf: fix integer size for %ld

This commit is contained in:
root 2018-11-09 22:49:33 +08:00
parent e6afb9cbae
commit eccee04e5a

View File

@ -437,6 +437,7 @@ STBSP__PUBLICDEF int STB_SPRINTF_DECORATE(vsprintfcb)(STBSP_SPRINTFCB *callback,
break;
// are we 64-bit (unix style)
case 'l':
fl |= ((sizeof(long int) == 8) ? STBSP__INTMAX : 0);
++f;
if (f[0] == 'l') {
fl |= STBSP__INTMAX;