applied Alex Sedov's Tab buffer termination patch, thanks

main
Anselm R Garbe 2013-04-17 20:59:12 +02:00
parent 0d12a47415
commit ec64f273fb
1 changed files with 2 additions and 1 deletions

View File

@ -392,7 +392,8 @@ keypress(XKeyEvent *ev) {
case XK_Tab:
if(!sel)
return;
strncpy(text, sel->text, sizeof text);
strncpy(text, sel->text, sizeof text - 1);
text[sizeof text - 1] = '\0';
cursor = strlen(text);
match();
break;