mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-26 12:27:44 +00:00
Fixed SDL_GetStringInteger() for values starting with '0' and '1' (thanks @DanielGibson!)
This commit is contained in:
@@ -237,10 +237,10 @@ int SDL_GetStringInteger(const char *value, int default_value)
|
||||
if (!value || !*value) {
|
||||
return default_value;
|
||||
}
|
||||
if (*value == '0' || SDL_strcasecmp(value, "false") == 0) {
|
||||
if (SDL_strcasecmp(value, "false") == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (*value == '1' || SDL_strcasecmp(value, "true") == 0) {
|
||||
if (SDL_strcasecmp(value, "true") == 0) {
|
||||
return 1;
|
||||
}
|
||||
if (*value == '-' || SDL_isdigit(*value)) {
|
||||
|
||||
Reference in New Issue
Block a user