mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
osd.c: in OSD_HandleChar() for TAB, fix use of uninitialized osd->editor.buf[i].
Exposed by Valgrind. DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4963 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
de2a14290f
commit
c6b9fa52d9
1 changed files with 1 additions and 1 deletions
|
@ -1033,7 +1033,7 @@ int32_t OSD_HandleChar(char ch)
|
||||||
if (!lastmatch)
|
if (!lastmatch)
|
||||||
{
|
{
|
||||||
for (i=osd->editor.pos; i>0; i--) if (osd->editor.buf[i-1] == ' ') break;
|
for (i=osd->editor.pos; i>0; i--) if (osd->editor.buf[i-1] == ' ') break;
|
||||||
for (j=0; osd->editor.buf[i] != ' ' && i < osd->editor.len; j++,i++)
|
for (j=0; i < osd->editor.len && osd->editor.buf[i] != ' '; j++,i++)
|
||||||
osd->editor.tmp[j] = osd->editor.buf[i];
|
osd->editor.tmp[j] = osd->editor.buf[i];
|
||||||
osd->editor.tmp[j] = 0;
|
osd->editor.tmp[j] = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue