strfkey should fill in the utf8 member of a key struct if it's empty

This commit is contained in:
Paul LeoNerd Evans 2011-03-31 14:07:55 +01:00
parent 5a6e289d23
commit f17f21752b
1 changed files with 2 additions and 0 deletions

View File

@ -1001,6 +1001,8 @@ size_t termkey_strfkey(TermKey *tk, char *buffer, size_t len, TermKeyKey *key, T
switch(key->type) {
case TERMKEY_TYPE_UNICODE:
if(!key->utf8[0]) // In case of user-supplied key structures
fill_utf8(key);
l = snprintf(buffer + pos, len - pos, "%s", key->utf8);
break;
case TERMKEY_TYPE_KEYSYM: