fix warning

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@250 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-10 10:24:26 +00:00
parent 36b84e2ee7
commit c9dcda72ee

View File

@@ -185,11 +185,14 @@ void MwLLNextEvent(MwLL handle) {
int n = -1;
char str[512];
KeySym sym;
str[0] = 0;
XLookupString(&ev.xkey, str, 512, &sym, NULL);
/* HACK: this is bad, you can guess why */
if(strlen(str) == 1) {
char s = str == NULL ? 0 : str[0];
char s = str[0];
if(ev.xkey.state & (ShiftMask | LockMask)) {
n = toupper((int)s);