mirror of
https://github.com/dborth/fceugx.git
synced 2025-01-10 07:39:39 +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;
|
int tc=0;
|
||||||
|
|
||||||
char * linebreak = strtok((char *)savebuffer, "\n");
|
char * linebreak = strtok((char *)savebuffer, "\n");
|
||||||
|
int line_num = 0;
|
||||||
|
|
||||||
while(linebreak != NULL)
|
while(linebreak != NULL && line_num < 500)
|
||||||
{
|
{
|
||||||
|
line_num++;
|
||||||
char *tbuf=linebreak;
|
char *tbuf=linebreak;
|
||||||
int doc=0;
|
int doc=0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user