From 5db64300b8353029d5ad6fafd950b4f4734967e4 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 7 Oct 2024 15:53:38 -0700 Subject: [PATCH] Fixed SDL_GetStringInteger() for values starting with '0' and '1' (thanks @DanielGibson!) --- src/SDL_hints.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SDL_hints.c b/src/SDL_hints.c index 6fcd8b8c2d..c92ad46fc0 100644 --- a/src/SDL_hints.c +++ b/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)) {