浏览代码

Merge branch 'fix-sprintf-int-size-1' of https://github.com/account-login/stb into working

Sean Barrett 6 年之前
父节点
当前提交
08759eb405
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      stb_sprintf.h

+ 1 - 0
stb_sprintf.h

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