diff options
author | Thomas Adam <thomas@xteddy.org> | 2016-03-02 18:10:51 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2016-03-02 18:10:51 +0000 |
commit | e304673c65d774bb76e5d55c095c8c8e6b05ff91 (patch) | |
tree | af461e71978b76dad59348d924a37f62b8c0bb7d /key-string.c | |
parent | e9d369a09e48ea8f940958025c8444988d31e840 (diff) | |
parent | b8a102d26f41e57b94359627a4df8f22af10c6fa (diff) | |
download | rtmux-e304673c65d774bb76e5d55c095c8c8e6b05ff91.tar.gz rtmux-e304673c65d774bb76e5d55c095c8c8e6b05ff91.tar.bz2 rtmux-e304673c65d774bb76e5d55c095c8c8e6b05ff91.zip |
Merge branch 'obsd-master'
Conflicts:
utf8.c
Diffstat (limited to 'key-string.c')
-rw-r--r-- | key-string.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/key-string.c b/key-string.c index dc211696..c56681f1 100644 --- a/key-string.c +++ b/key-string.c @@ -149,6 +149,7 @@ key_string_lookup_string(const char *string) struct utf8_data ud; u_int i; enum utf8_state more; + wchar_t wc; /* Is this no key? */ if (strcasecmp(string, "None") == 0) @@ -185,8 +186,9 @@ key_string_lookup_string(const char *string) more = utf8_append(&ud, (u_char)string[i]); if (more != UTF8_DONE) return (KEYC_UNKNOWN); - key = utf8_combine(&ud); - return (key | modifiers); + if (utf8_combine(&ud, &wc) != UTF8_DONE) + return (KEYC_UNKNOWN); + return (wc | modifiers); } /* Otherwise look the key up in the table. */ |