Commit 6ca6ba5a authored by Sam Lantinga's avatar Sam Lantinga

Fixed crash if conversion fails. Use ISO name for Latin-1

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402591
parent 4b1e7aae
......@@ -448,9 +448,11 @@ SDL_GetKeyName(SDLKey key)
char *cvt;
temp[0] = (char) key;
temp[1] = '\0';
cvt = SDL_iconv_string("UTF-8", "LATIN1", temp, 1);
cvt = SDL_iconv_string("UTF-8", "ISO-8859-1", temp, 1);
if (cvt) {
SDL_strlcpy(temp, cvt, SDL_arraysize(temp));
SDL_free(cvt);
}
keyname = temp;
} else {
keyname = "unknown key";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment