prevent infinite loop loading cheats.

This commit is contained in:
Daryl Borth 2018-08-26 15:15:10 -06:00
parent 68341dbbae
commit 31aae65d64

View File

@ -42,9 +42,11 @@ static int LoadCheats (int length)
int tc=0;
char * linebreak = strtok((char *)savebuffer, "\n");
int line_num = 0;
while(linebreak != NULL)
while(linebreak != NULL && line_num < 500)
{
line_num++;
char *tbuf=linebreak;
int doc=0;