mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 05:11:34 +00:00
Fix the game crashing if you put params with no "=" for some reason in some of the SOC blocks, just stop going through the lines if that happens
This commit is contained in:
parent
10f9403619
commit
e9ea1b47d5
1 changed files with 32 additions and 8 deletions
|
@ -1035,7 +1035,10 @@ static void readlevelheader(MYFILE *f, INT32 num)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -1616,7 +1619,10 @@ static void readhuditem(MYFILE *f, INT32 num)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -2118,7 +2124,10 @@ static void reademblemdata(MYFILE *f, INT32 num)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -2258,7 +2267,10 @@ static void readextraemblemdata(MYFILE *f, INT32 num)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -2342,7 +2354,10 @@ static void readunlockable(MYFILE *f, INT32 num)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -2629,7 +2644,10 @@ static void readconditionset(MYFILE *f, UINT8 setnum)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -2874,7 +2892,10 @@ static void readmaincfg(MYFILE *f)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
@ -3113,7 +3134,10 @@ static void readwipes(MYFILE *f)
|
|||
|
||||
// Get the part before the " = "
|
||||
tmp = strchr(s, '=');
|
||||
if (tmp)
|
||||
*(tmp-1) = '\0';
|
||||
else
|
||||
break;
|
||||
strupr(word);
|
||||
|
||||
// Now get the part after
|
||||
|
|
Loading…
Reference in a new issue