Sfoglia il codice sorgente

stb_sprintf: fix integer size for %ld

root 6 anni fa
parent
commit
eccee04e5a
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      stb_sprintf.h

+ 1 - 0
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;