nothings / stb

stb single-file public domain libraries for C/C++
https://twitter.com/nothings
Other
26.55k stars 7.69k forks source link

possibly incorrect function signatures in stb_sprintf #1621

Open apache-hb opened 6 months ago

apache-hb commented 6 months ago

Describe the bug stbsp_vsnprintf and stbsp_snprintf have incorrect function signatures according to the C specification.

According to n3096 7.23.6.5 and 7.23.6.12 the second parameter to [v]snprintf should be of type size_t, in stb_sprintf it is int. Is this an intentional difference or should these be size_t's?