stb_sprintf: support hh

This commit is contained in:
Sean Barrett 2020-02-02 08:04:34 -08:00
parent d4871226e4
commit e943476f7f

View File

@ -3,7 +3,7 @@
// http://github.com/nothings/stb // http://github.com/nothings/stb
// //
// allowed types: sc uidBboXx p AaGgEef n // allowed types: sc uidBboXx p AaGgEef n
// lengths : h ll j z t I64 I32 I // lengths : hh h ll j z t I64 I32 I
// //
// Contributors: // Contributors:
// Fabian "ryg" Giesen (reformatting) // Fabian "ryg" Giesen (reformatting)
@ -471,6 +471,8 @@ STBSP__PUBLICDEF int STB_SPRINTF_DECORATE(vsprintfcb)(STBSP_SPRINTFCB *callback,
case 'h': case 'h':
fl |= STBSP__HALFWIDTH; fl |= STBSP__HALFWIDTH;
++f; ++f;
if (f[0] == 'h')
++f; // QUARTERWIDTH
break; break;
// are we 64-bit (unix style) // are we 64-bit (unix style)
case 'l': case 'l':