A hint with an empty string should be treated as the default value
authorSam Lantinga <slouken@libsdl.org>
Thu, 21 Sep 2017 14:48:03 -0700
changeset 115135eafaa1085a1
parent 11512 a1d8a2ce9d01
child 11514 60aaf59fd191
A hint with an empty string should be treated as the default value
src/SDL_hints.c
     1.1 --- a/src/SDL_hints.c	Thu Sep 21 10:29:17 2017 -0700
     1.2 +++ b/src/SDL_hints.c	Thu Sep 21 14:48:03 2017 -0700
     1.3 @@ -122,7 +122,7 @@
     1.4  SDL_GetHintBoolean(const char *name, SDL_bool default_value)
     1.5  {
     1.6      const char *hint = SDL_GetHint(name);
     1.7 -    if (!hint) {
     1.8 +    if (!hint || !*hint) {
     1.9          return default_value;
    1.10      }
    1.11      if (*hint == '0' || SDL_strcasecmp(hint, "false") == 0) {