Merge pull request #44 from STJrInuyasha/patch-1

Make sure "word" in readlevelheader gets reset
This commit is contained in:
Alam Arias 2015-06-17 11:01:43 -04:00
commit 9422ca4427
1 changed files with 4 additions and 1 deletions

View File

@ -998,7 +998,7 @@ static const struct {
static void readlevelheader(MYFILE *f, INT32 num)
{
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
char *word = s;
char *word;
char *word2;
//char *word3; // Non-uppercase version of word2
char *tmp;
@ -1027,6 +1027,9 @@ static void readlevelheader(MYFILE *f, INT32 num)
if (s == tmp)
continue; // Skip comment lines, but don't break.
// Set / reset word, because some things (Lua.) move it
word = s;
// Get the part before the " = "
tmp = strchr(s, '=');
*(tmp-1) = '\0';