Commit Graph

11 Commits

Author SHA1 Message Date
Anonymous Maarten 274ec02581 testautomation: avoid format related warnings by using a few pragma's
ci: enable -Werror to a few platforms
2022-10-08 23:41:07 +02:00
Sam Lantinga c70ffc2a35 Added size_t format specifier test coverage for SDL_snprintf and SDL_sscanf 2022-09-19 15:34:17 -07:00
Sam Lantinga 9065897514 Added test for digit count in sscanf, e.g. "%1x" 2022-06-18 06:53:05 -07:00
Simon McVittie d15f6e379c test: Add a unit test for overflow detection
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-05-09 21:31:39 -07:00
Sam Lantinga dc4c7d9539 Fixed infinite loop in SDL_vsnprintf() if the format string is too large for the output buffer
Fixes https://github.com/libsdl-org/SDL/issues/4940
2021-11-10 09:48:49 -08:00
Sam Lantinga cdb4d8f22f Added a test case for snprintf of 0.0
This verifies regressions in https://github.com/libsdl-org/SDL/issues/4795
2021-11-07 09:39:57 -08:00
Sam Lantinga 79b0aae86c The return value of SDL_snprintf is the number of characters that would have been written.
Fixes https://github.com/libsdl-org/SDL/issues/4762
2021-09-22 11:46:24 -07:00
Ryan C. Gordon 70c8bd2481 Fixed a bunch of compiler warnings in the test code. 2017-01-07 22:24:45 -05:00
Philipp Wiesemann b524657118 Fixed three source comments in tests. 2016-06-28 21:15:16 +02:00
Philipp Wiesemann b5aa5b04d6 Added a simple test case for SDL_sscanf() to tests.
It fails on platforms where SDL's custom implementation is used.

Relates to Bugzilla #3341.
2016-06-28 21:14:11 +02:00
Philipp Wiesemann 0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00