cleanup more warnings

This commit is contained in:
Daryl 2020-06-28 15:55:56 -06:00
parent 92e5513892
commit 3629710c72
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ bool SaveState (char * filepath, bool silent)
char screenpath[1024];
strncpy(screenpath, filepath, 1024);
screenpath[strlen(screenpath)-4] = 0;
sprintf(screenpath, "%s.png", screenpath);
strcat(screenpath, ".png");
SaveFile((char *)gameScreenPng, screenpath, gameScreenPngSize, silent);
}
@ -125,7 +125,7 @@ bool SavePreviewImg (char * filepath, bool silent)
char screenpath[1024];
strncpy(screenpath, filepath, 1024);
screenpath[strlen(screenpath)] = 0;
sprintf(screenpath, "%s.png", screenpath);
strcat(screenpath, ".png");
SaveFile((char *)gameScreenPng, screenpath, gameScreenPngSize, silent);
}

View File

@ -237,7 +237,7 @@ int UpdateDirName()
if ((strlen(browser.dir)+1+strlen(browserList[browser.selIndex].filename)) < MAXPATHLEN)
{
/* update current directory name */
sprintf(browser.dir, "%s%s/",browser.dir, browserList[browser.selIndex].filename);
sprintf(browser.dir+strlen(browser.dir), "%s/", browserList[browser.selIndex].filename);
return 1;
}
else