resetexstate crash fix

This commit is contained in:
CaH4e3 2011-09-28 13:28:21 +00:00
parent 0d686906b6
commit 6cb352f626
1 changed files with 1 additions and 1 deletions

View File

@ -836,7 +836,7 @@ void AddExState(void *v, uint32 s, int type, char *desc)
{
if(desc)
{
SFMDATA[SFEXINDEX].desc=(char *)FCEU_malloc(5);
SFMDATA[SFEXINDEX].desc=(char *)FCEU_malloc(strlen(desc)+1);
strcpy(SFMDATA[SFEXINDEX].desc,desc);
}
else