summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2006-10-16 07:29:06 +0000
committerRich Felker <dalias@aerifal.cx>2006-10-16 07:29:06 +0000
commitd75f803371a79f31b5b9bb8f9d59dd4a65e4b89e (patch)
tree63604f59870528232aa44357b92807c57e90482f
parent08411a96ec1c25970b0d63db7b5d061329562fdf (diff)
downloaduuterm-d75f803371a79f31b5b9bb8f9d59dd4a65e4b89e.tar.gz
don't know if this is a bug somewhere else, but for whatever reason i
was getting non-null-terminated strings sometime?!
-rw-r--r--xlib.c1
1 files changed, 1 insertions, 0 deletions
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--;