Browse Source

Fixed SDL_GetStringInteger() for values starting with '0' and '1' (thanks @DanielGibson!)

Sam Lantinga 6 months ago
parent
commit
5db64300b8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/SDL_hints.c

+ 2 - 2
src/SDL_hints.c

@@ -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)) {