A hint with an empty string should be treated as the default value

This commit is contained in:
Sam Lantinga
2017-09-21 14:48:03 -07:00
parent 18db1a84f7
commit 2e102d0786

View File

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