From c9dcda72ee811f0548704af753a5222a66fe25f9 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Fri, 10 Oct 2025 10:24:26 +0000 Subject: [PATCH] fix warning git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@250 b9cfdab3-6d41-4d17-bbe4-086880011989 --- src/backend/x11.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/x11.c b/src/backend/x11.c index d2a84eb..0008dda 100644 --- a/src/backend/x11.c +++ b/src/backend/x11.c @@ -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);