mirror of
https://github.com/dborth/fceugx.git
synced 2024-10-31 22:45:05 +01:00
prevent infinite loop loading cheats.
This commit is contained in:
parent
68341dbbae
commit
31aae65d64
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user