OSD: fix oob write for Ctrl+K ("delete all to end of line").

git-svn-id: https://svn.eduke32.com/eduke32@5323 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2015-08-09 09:58:44 +00:00
parent ae56faf0ad
commit c3fa10ab07

View file

@ -1090,7 +1090,8 @@ int32_t OSD_HandleChar(char ch)
}
return 0;
case 11: // control k, delete all to end of line
Bmemset(osd->editor.buf + osd->editor.pos, 0, OSDBUFFERSIZE - osd->editor.pos);
Bmemset(osd->editor.buf + osd->editor.pos, 0, OSDEDITLENGTH - osd->editor.pos);
osd->editor.len = osd->editor.pos;
return 0;
case 12: // control l, clear screen
Bmemset(osd->text.buf, 0, OSDBUFFERSIZE);