summaryrefslogtreecommitdiff
path: root/xev.c
diff options
context:
space:
mode:
Diffstat (limited to 'xev.c')
-rw-r--r--xev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xev.c b/xev.c
index de4e6e8..5b352df 100644
--- a/xev.c
+++ b/xev.c
@@ -178,13 +178,13 @@ do_KeyPress(XEvent *eventp)
if (e->type == KeyPress && xic) {
do {
nmbbytes = XmbLookupString(xic, e, buf, bsize - 1, &ks, &status);
- buf[nmbbytes] = '\0';
if (status == XBufferOverflow) {
bsize = nmbbytes + 1;
buf = realloc(buf, bsize);
}
} while (status == XBufferOverflow);
+ buf[nmbbytes] = '\0';
}
if (ks == NoSymbol)