diff options
author | Thomas Adam <thomas@xteddy.org> | 2016-11-23 18:01:19 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2016-11-23 18:01:19 +0000 |
commit | 8a8001350db320f6c8adfef161f96d0abb67e2b4 (patch) | |
tree | 315159db7eb6665c32d0bed155222ae627c80b44 /key-string.c | |
parent | 442e49f51c07a1fc508c6889d77065b8b4894893 (diff) | |
parent | 6de466cf8b665d8725301307c57f6d8cb2e65a3f (diff) | |
download | rtmux-8a8001350db320f6c8adfef161f96d0abb67e2b4.tar.gz rtmux-8a8001350db320f6c8adfef161f96d0abb67e2b4.tar.bz2 rtmux-8a8001350db320f6c8adfef161f96d0abb67e2b4.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'key-string.c')
-rw-r--r-- | key-string.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/key-string.c b/key-string.c index d513ec6f..9ee1c2d2 100644 --- a/key-string.c +++ b/key-string.c @@ -140,6 +140,9 @@ key_string_get_modifiers(const char **string) case 's': modifiers |= KEYC_SHIFT; break; + default: + *string = NULL; + return 0; } *string += 2; } @@ -179,7 +182,7 @@ key_string_lookup_string(const char *string) string++; } modifiers |= key_string_get_modifiers(&string); - if (string[0] == '\0') + if (string == NULL || string[0] == '\0') return (KEYC_UNKNOWN); /* Is this a standard ASCII key? */ |