From d75f803371a79f31b5b9bb8f9d59dd4a65e4b89e Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 16 Oct 2006 07:29:06 +0000 Subject: don't know if this is a bug somewhere else, but for whatever reason i was getting non-null-terminated strings sometime?! --- xlib.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlib.c') diff --git a/xlib.c b/xlib.c index 97f3058..1eff26d 100644 --- a/xlib.c +++ b/xlib.c @@ -260,6 +260,7 @@ void uudisp_next_event(struct uudisp *d, void *fds) } } else r = XLookupString((void *)&ev, tmp, sizeof(tmp), &ks, 0); if (r>=sizeof(tmp)) continue; + tmp[r] = 0; if ((ev.xkey.state & Mod1Mask) && l) { *s++ = '\033'; l--; -- cgit v1.2.3