commit | e247fc4d55f0c3ef5b2596294fc8ffe7430fae7a | [log] [tgz] |
---|---|---|
author | Sam Lantinga <slouken@libsdl.org> | Thu Sep 21 14:48:03 2017 -0700 |
committer | Sam Lantinga <slouken@libsdl.org> | Thu Sep 21 14:48:03 2017 -0700 |
tree | 210b2112d40aa9cfb8150131e162e8df04686d30 | |
parent | 28013a650a4dacbd0b7c9641afc5cbaba3900cfc [diff] |
A hint with an empty string should be treated as the default value
diff --git a/src/SDL_hints.c b/src/SDL_hints.c index b3a85b9..6aa2996 100644 --- a/src/SDL_hints.c +++ b/src/SDL_hints.c
@@ -122,7 +122,7 @@ 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) {