Fabian Giesen
3be65f1c0c
stb_sprintf: Small simplification
...
This was intentional but we might as well just set cs=0
directly here.
Fixes issue #997 .
ago%!(EXTRA string=4 years)
Fabian Giesen
013884b53b
stb_sprintf: Fix string length calc
...
Factor out string length computation into helper func, comment
it a bit more, always use a limit to avoid 32b unsigned overflow,
and avoid reading past the bounds of non-0-terminated strings given
with specified precision.
Fixes issue #966 .
ago%!(EXTRA string=4 years)
Fabian Giesen
46c259ff90
stb_sprintf: PUBLICDEC on declarations, as intended
...
The code was using PUBLICDEF on both declarations and
definitions.
Fixes issue #458 .
ago%!(EXTRA string=4 years)
Doj
067655993a
stb_sprintf: fix stbsp_ddtoS64 macro
...
Should use xh argument not ph (which is the name of the
variable that it actually gets instantiated with the
one time it is used).
ago%!(EXTRA string=4 years)
Rafael Sachetto
02578923d3
Fix compilation warnings in the s390x architeture. Fixes #1082 .
ago%!(EXTRA string=4 years)
Valentin Lenhart
2de22bde0a
stb_sprintf.h: stdlib.h is not needed
...
va_arg() is in stdarg.h, which is already being included
ago%!(EXTRA string=4 years)
Michael Aganier
696cb038a3
stb_sprintf: add attribute format to variadic functions
...
This allows for compiler verification of the format string
just like printf.
ago%!(EXTRA string=4 years)
Doj
0755e6a76f
stb_sprintf: fix stbsp_ddtoS64 macro
...
Should use xh argument not ph (which is the name of the
variable that it actually gets instantiated with the
one time it is used).
ago%!(EXTRA string=4 years)
Rafael Sachetto
0cc6060b77
Fix compilation warnings in the s390x architeture. Fixes #1082 .
ago%!(EXTRA string=4 years)
Valentin Lenhart
073114d111
stb_sprintf.h: stdlib.h is not needed
...
va_arg() is in stdarg.h, which is already being included
ago%!(EXTRA string=4 years)
Michael Aganier
40d7e47896
stb_sprintf: add attribute format to variadic functions
...
This allows for compiler verification of the format string
just like printf.
ago%!(EXTRA string=4 years)
Sean Barrett
314d0a6f9a
update version numbers
ago%!(EXTRA string=5 years)
Sean Barrett
a2c91804a3
stb_sprintf: avoid clang -O3 misaligned access
ago%!(EXTRA string=5 years)
Sean Barrett
37b9b20fde
update version numbers
ago%!(EXTRA string=5 years)
Sean Barrett
cb9d4e9547
sprintf: warning fixes
ago%!(EXTRA string=5 years)
Sean Barrett
f06f586d18
sprintf warnings
ago%!(EXTRA string=5 years)
Marcin Wojdyr
3366d1e797
stb_sprintf: avoid left shift of negative value
...
fix undefined behaviour reported by UBSan:
runtime error: left shift of negative value -9223372036854775808
and add a test case.
fixes #800
ago%!(EXTRA string=5 years)
Marcin Wojdyr
3bb12a14e9
stb_sprintf.h: fix unused-parameter warning
ago%!(EXTRA string=5 years)
Sean Barrett
5e4a0617b7
udpate version numbers
ago%!(EXTRA string=5 years)
Sean Barrett
e943476f7f
stb_sprintf: support hh
ago%!(EXTRA string=5 years)
Sean Barrett
3f5db89baf
stb_sprintf: redo ASAN fixes after problematic merge
ago%!(EXTRA string=5 years)
Sean Barrett
e802821e4d
stb_sprintf: PR 613
ago%!(EXTRA string=5 years)
arlecchino
117e1741a2
stb_printf - added contributor
ago%!(EXTRA string=6 years)
arlecchino
b97d06e0fa
fix: stb_sprintf - gcc defines __powerpc64__
...
Fix for stb_sprintf https://github.com/nothings/stb/issues/806
fixes #806
ago%!(EXTRA string=6 years)
Sean Barrett
63b59b46b0
update version numbers
ago%!(EXTRA string=6 years)
Sean Barrett
a23f466de0
"long int" => "long"
ago%!(EXTRA string=6 years)
Sean Barrett
f11f1e801a
stb_sprintf: credits
ago%!(EXTRA string=6 years)
Sean Barrett
9643f6bd98
stb_sprintf: fix unaligned digitpair[], fix some signed-right-shifts
ago%!(EXTRA string=6 years)
Sean Barrett
82310cc5ff
stb_sprintf: fix unaligned digitpair[], fix some signed-right-shifts
ago%!(EXTRA string=6 years)
Sean Barrett
619cdb6a3b
stb_sprintf: fix 32 vs 64-bit sizes for format widts j/z/t
ago%!(EXTRA string=6 years)
Sean Barrett
9f1ef73e96
stb_sprintf: minor reformatting
ago%!(EXTRA string=6 years)
root
eccee04e5a
stb_sprintf: fix integer size for %ld
ago%!(EXTRA string=7 years)
Stefano Zanotti
05b45da629
stb_sprintf: fix unaligned access
...
Fix an unaligned 32-bit access even if STB_SPRINTF_NOUNALIGNED was defined.
ago%!(EXTRA string=7 years)
luz.paz
622b3adad3
Misc. comment typos
...
Found via `codespell -q 3`
ago%!(EXTRA string=7 years)
Sean Barrett
01daa3a244
stb_sprintf: fix size-only snprintf query
ago%!(EXTRA string=7 years)
Sean Barrett
ee0ebfc79b
version numbers
ago%!(EXTRA string=7 years)
Sean Barrett
5f1a73fe4e
credits, tests
ago%!(EXTRA string=7 years)
Marcin Wojdyr
3a969eb64c
remove duplicated `pr = 0`
...
avoid warning:
Variable 'pr' is reassigned a value before the old one has been used
caused by:
fw = pr = fl = 0;
...
pr = 0;
ago%!(EXTRA string=8 years)
Marcin Wojdyr
7d80a8b44d
avoid GCC7 implicit-fallthrough warning
...
(GCC recognizes certain strings in comments)
ago%!(EXTRA string=8 years)
Rohit Nirmal
747b8d8f71
stb_sprintf.h: Don't compare uninitialized value when using zero.
...
This prevents a "Conditional jump or move depends on uninitialised
value(s)" error from valgrind when using zero as an argument in line
1045.
ago%!(EXTRA string=8 years)
Sean Barrett
555efbedfc
Update version numbers
ago%!(EXTRA string=8 years)
Fabian Giesen
481db7501c
stb_sprintf: Remove some gratuitous gotos
ago%!(EXTRA string=8 years)
Fabian Giesen
7b8955bfaa
stb_sprintf: More whitespace cleanups post clang-format
ago%!(EXTRA string=8 years)
Fabian Giesen
cccbc3f5a9
stb_sprintf: Clean up the mess with clang-format
ago%!(EXTRA string=8 years)
Kevin Schmidt
9835483187
Edit contributor list.
ago%!(EXTRA string=8 years)
Kevin Schmidt
8926141719
Improve stb_sprintf asan workaround.
...
Adds support for more versions of clang and gcc.
ago%!(EXTRA string=8 years)
Sean Barrett
c918a6b801
tweak previous PR merge
ago%!(EXTRA string=8 years)
Sean Barrett
324be64e80
version number
ago%!(EXTRA string=8 years)
Sean Barrett
e248e30954
change license to public-domain AND mit (based on twitter vote)
ago%!(EXTRA string=8 years)
Sean Barrett
96620a3a54
update version numbers
ago%!(EXTRA string=8 years)