From eccee04e5a6cc125b24d2d0a2dd6c8d46bc1d51d Mon Sep 17 00:00:00 2001 From: root Date: Fri, 9 Nov 2018 22:49:33 +0800 Subject: [PATCH] stb_sprintf: fix integer size for %ld --- stb_sprintf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stb_sprintf.h b/stb_sprintf.h index 0ad26b2..ed7d27e 100644 --- a/stb_sprintf.h +++ b/stb_sprintf.h @@ -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;