Fixed crash when loading/saving via buttons

This commit is contained in:
Rob Pearce 2009-07-29 20:06:00 +00:00
parent 1399024438
commit 122f7f1207
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
#define VERSION "1.9" #define VERSION "1.9a"
/* variable sizes */ /* variable sizes */
#define SMALLBUFLEN 64 /* small text buffer */ #define SMALLBUFLEN 64 /* small text buffer */

View File

@ -1251,6 +1251,7 @@ int main (int argc, char **argv) {
starty = ((screen->h - STATUSH)/2)-2; starty = ((screen->h - STATUSH)/2)-2;
bg = NULL; bg = NULL;
strcpy(text, currentfilename); strcpy(text, currentfilename);
textpos = &text[strlen(text)];
changestate(S_SAVING); changestate(S_SAVING);
drawmap(TRUE); drawmap(TRUE);
break; break;
@ -1259,6 +1260,7 @@ int main (int argc, char **argv) {
starty = ((screen->h - STATUSH)/2)-2; starty = ((screen->h - STATUSH)/2)-2;
bg = NULL; bg = NULL;
strcpy(text, currentfilename); strcpy(text, currentfilename);
textpos = &text[strlen(text)];
changestate(S_LOADING); changestate(S_LOADING);
drawmap(TRUE); drawmap(TRUE);
break; break;