Use a path length of 4096 for loading save data.

This commit is contained in:
Steve 2018-04-29 09:58:37 +01:00
parent 052f39fbad
commit abc4e576fb
2 changed files with 3 additions and 2 deletions

View File

@ -57,6 +57,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MAX_DESCRIPTION_LENGTH 512 #define MAX_DESCRIPTION_LENGTH 512
#define MAX_LINE_LENGTH 1024 #define MAX_LINE_LENGTH 1024
#define MAX_FILENAME_LENGTH 1024 #define MAX_FILENAME_LENGTH 1024
#define MAX_PATH_LENGTH 4096
#define NUM_TEXTURE_BUCKETS 32 #define NUM_TEXTURE_BUCKETS 32

View File

@ -82,8 +82,8 @@ int writeFile(char *filename, char *data)
char *getSaveFilePath(char *filename) char *getSaveFilePath(char *filename)
{ {
static char path[MAX_FILENAME_LENGTH]; static char path[MAX_PATH_LENGTH];
memset(path, '\0', MAX_FILENAME_LENGTH); memset(path, '\0', MAX_PATH_LENGTH);
sprintf(path, "%s/%s", app.saveDir, filename); sprintf(path, "%s/%s", app.saveDir, filename);