mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +00:00
Public remake of a merge request I shouldn't have put in Internal in the first place.
This commit is contained in:
parent
b949f49c68
commit
5f4f6fdac8
2 changed files with 4 additions and 2 deletions
|
@ -1675,6 +1675,7 @@ char *M_GetToken(const char *inputString)
|
||||||
|| stringToUse[startPos] == '\r'
|
|| stringToUse[startPos] == '\r'
|
||||||
|| stringToUse[startPos] == '\n'
|
|| stringToUse[startPos] == '\n'
|
||||||
|| stringToUse[startPos] == '\0'
|
|| stringToUse[startPos] == '\0'
|
||||||
|
|| stringToUse[startPos] == '"' // we're treating this as whitespace because SLADE likes adding it for no good reason
|
||||||
|| inComment != 0)
|
|| inComment != 0)
|
||||||
&& startPos < stringLength)
|
&& startPos < stringLength)
|
||||||
{
|
{
|
||||||
|
@ -1742,6 +1743,7 @@ char *M_GetToken(const char *inputString)
|
||||||
&& stringToUse[endPos] != ','
|
&& stringToUse[endPos] != ','
|
||||||
&& stringToUse[endPos] != '{'
|
&& stringToUse[endPos] != '{'
|
||||||
&& stringToUse[endPos] != '}'
|
&& stringToUse[endPos] != '}'
|
||||||
|
&& stringToUse[endPos] != '"' // see above
|
||||||
&& inComment == 0)
|
&& inComment == 0)
|
||||||
&& endPos < stringLength)
|
&& endPos < stringLength)
|
||||||
{
|
{
|
||||||
|
|
|
@ -509,7 +509,7 @@ void P_ParseAnimationDefintion(SINT8 istexture, INT32 *i)
|
||||||
animdefsToken = M_GetToken(NULL);
|
animdefsToken = M_GetToken(NULL);
|
||||||
if (animdefsToken == NULL)
|
if (animdefsToken == NULL)
|
||||||
{
|
{
|
||||||
I_Error("Error parsing TEXTURES lump: Unexpected end of file where \"%s\"'s animation speed should be", animdefs[*i].startname);
|
I_Error("Error parsing ANIMDEFS lump: Unexpected end of file where \"%s\"'s animation speed should be", animdefs[*i].startname);
|
||||||
}
|
}
|
||||||
endPos = NULL;
|
endPos = NULL;
|
||||||
#ifndef AVOID_ERRNO
|
#ifndef AVOID_ERRNO
|
||||||
|
@ -523,7 +523,7 @@ void P_ParseAnimationDefintion(SINT8 istexture, INT32 *i)
|
||||||
#endif
|
#endif
|
||||||
|| animSpeed < 0) // Number is not positive
|
|| animSpeed < 0) // Number is not positive
|
||||||
{
|
{
|
||||||
I_Error("Error parsing TEXTURES lump: Expected a positive integer for \"%s\"'s animation speed, got \"%s\"", animdefs[*i].startname, animdefsToken);
|
I_Error("Error parsing ANIMDEFS lump: Expected a positive integer for \"%s\"'s animation speed, got \"%s\"", animdefs[*i].startname, animdefsToken);
|
||||||
}
|
}
|
||||||
animdefs[*i].speed = animSpeed;
|
animdefs[*i].speed = animSpeed;
|
||||||
Z_Free(animdefsToken);
|
Z_Free(animdefsToken);
|
||||||
|
|
Loading…
Reference in a new issue