Răsfoiți Sursa

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

Sam Lantinga 1 an în urmă
părinte
comite
5db64300b8
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  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)) {