Edit sdlStateName, fixing SDL states on a Mac

Previously this function returned true for `if(saveDir)` when `saveDir` was simply a zero length string following a branch that returned `/<savepath>` which doesn't work when the user isn't a root user.
This commit is contained in:
Andy Chase 2016-06-25 01:30:34 -07:00 committed by GitHub
parent fa81621ddf
commit dfaf44eed9
1 changed files with 1 additions and 1 deletions

View File

@ -641,7 +641,7 @@ static char * sdlStateName(int num)
{
static char stateName[2048];
if(saveDir)
if(saveDir && strlen(saveDir))
sprintf(stateName, "%s/%s%d.sgm", saveDir, sdlGetFilename(filename),
num+1);
else if (homeDir)