about summary refs log tree commit diff
path: root/dmenu.c
diff options
context:
space:
mode:
authora@null <unknown>2008-12-09 21:55:47 +0000
committera@null <unknown>2008-12-09 21:55:47 +0000
commit4e74263ba02edc7da07f23b2737a1e471375a6e8 (patch)
treedb29579989519730d4c65f9a5b98d1ca5dad94b0 /dmenu.c
parentAdded tag 3.9 for changeset 21a1ed9a69b9 (diff)
downloaddmenu-4e74263ba02edc7da07f23b2737a1e471375a6e8.tar.gz
dmenu-4e74263ba02edc7da07f23b2737a1e471375a6e8.tar.bz2
dmenu-4e74263ba02edc7da07f23b2737a1e471375a6e8.zip
minor modification
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/dmenu.c b/dmenu.c
index c0addad..44b4254 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -396,10 +396,7 @@ kpress(XKeyEvent * e) {
 	default:
 		if(num && !iscntrl((int) buf[0])) {
 			buf[num] = 0;
-			if(len > 0)
-				strncat(text, buf, sizeof text);
-			else
-				strncpy(text, buf, sizeof text);
+			strncpy(text + len, buf, sizeof text - len);
 			match(text);
 		}
 		break;