applied Alex Sedov's Tab buffer termination patch, thanks
ec64f273
1 file(s) · +2 −1
| 392 | 392 | case XK_Tab: |
|
| 393 | 393 | if(!sel) |
|
| 394 | 394 | return; |
|
| 395 | - | strncpy(text, sel->text, sizeof text); |
|
| 395 | + | strncpy(text, sel->text, sizeof text - 1); |
|
| 396 | + | text[sizeof text - 1] = '\0'; |
|
| 396 | 397 | cursor = strlen(text); |
|
| 397 | 398 | match(); |
|
| 398 | 399 | break; |