From b3ac0b6fb062388166534fdb47c31727a11b1340 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 21 Sep 2017 14:48:03 -0700 Subject: [PATCH] A hint with an empty string should be treated as the default value --- src/SDL_hints.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SDL_hints.c b/src/SDL_hints.c index b3a85b95f83d7..6aa299652dbf5 100644 --- a/src/SDL_hints.c +++ b/src/SDL_hints.c @@ -122,7 +122,7 @@ SDL_bool SDL_GetHintBoolean(const char *name, SDL_bool default_value) { const char *hint = SDL_GetHint(name); - if (!hint) { + if (!hint || !*hint) { return default_value; } if (*hint == '0' || SDL_strcasecmp(hint, "false") == 0) {