mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Merge pull request #44 from STJrInuyasha/patch-1
Make sure "word" in readlevelheader gets reset
This commit is contained in:
commit
9422ca4427
1 changed files with 4 additions and 1 deletions
|
@ -998,7 +998,7 @@ static const struct {
|
||||||
static void readlevelheader(MYFILE *f, INT32 num)
|
static void readlevelheader(MYFILE *f, INT32 num)
|
||||||
{
|
{
|
||||||
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
|
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
|
||||||
char *word = s;
|
char *word;
|
||||||
char *word2;
|
char *word2;
|
||||||
//char *word3; // Non-uppercase version of word2
|
//char *word3; // Non-uppercase version of word2
|
||||||
char *tmp;
|
char *tmp;
|
||||||
|
@ -1027,6 +1027,9 @@ static void readlevelheader(MYFILE *f, INT32 num)
|
||||||
if (s == tmp)
|
if (s == tmp)
|
||||||
continue; // Skip comment lines, but don't break.
|
continue; // Skip comment lines, but don't break.
|
||||||
|
|
||||||
|
// Set / reset word, because some things (Lua.) move it
|
||||||
|
word = s;
|
||||||
|
|
||||||
// Get the part before the " = "
|
// Get the part before the " = "
|
||||||
tmp = strchr(s, '=');
|
tmp = strchr(s, '=');
|
||||||
*(tmp-1) = '\0';
|
*(tmp-1) = '\0';
|
||||||
|
|
Loading…
Reference in a new issue