mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-07 04:17:14 +00:00
Fix overflow when doing SDL_sscanf("%hd", ...)
An overflow occured in the stdlib_sscanf test, when using msys2 clang32 toolchain.
This commit is contained in:
committed by
Sam Lantinga
parent
9129e1d557
commit
342ec51131
@@ -1275,7 +1275,9 @@ int SDL_vsscanf(const char *text, const char *fmt, va_list ap)
|
||||
suppress = SDL_TRUE;
|
||||
break;
|
||||
case 'h':
|
||||
if (inttype > DO_SHORT) {
|
||||
if (inttype == DO_INT) {
|
||||
inttype = DO_SHORT;
|
||||
} else if (inttype > DO_SHORT) {
|
||||
++inttype;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user