diff options
-rw-r--r-- | xev.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |