mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'EOFEndsDefinition' into 'master'
Fix off-by-one error in BRIGHT and TERRAIN lump parsing See merge request KartKrew/RingRacers!35
This commit is contained in:
commit
5d7f74299d
2 changed files with 12 additions and 12 deletions
|
|
@ -112,7 +112,7 @@ static boolean K_BRIGHTLumpParser(char *data, size_t size)
|
|||
tkn = M_GetToken(NULL);
|
||||
pos = M_GetTokenPos();
|
||||
|
||||
if (tkn && pos < size)
|
||||
if (tkn && pos <= size)
|
||||
{
|
||||
brightmapStorage_t *bms = K_GetBrightmapStorageByTextureName(tkn);
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ static boolean K_BRIGHTLumpParser(char *data, size_t size)
|
|||
tkn = M_GetToken(NULL);
|
||||
pos = M_GetTokenPos();
|
||||
|
||||
if (tkn && pos < size)
|
||||
if (tkn && pos <= size)
|
||||
{
|
||||
strncpy(bms->brightmapName, tkn, 8);
|
||||
bms->brightmapHash = quickncasehash(tkn, 8);
|
||||
|
|
|
|||
|
|
@ -1823,7 +1823,7 @@ static boolean K_TERRAINLumpParser(char *data, size_t size)
|
|||
tkn = M_GetToken(NULL);
|
||||
pos = M_GetTokenPos();
|
||||
|
||||
if (tkn && pos < size)
|
||||
if (tkn && pos <= size)
|
||||
{
|
||||
t_splash_t *s = NULL;
|
||||
|
||||
|
|
@ -1864,7 +1864,7 @@ static boolean K_TERRAINLumpParser(char *data, size_t size)
|
|||
tkn = M_GetToken(NULL);
|
||||
pos = M_GetTokenPos();
|
||||
|
||||
if (tkn && pos < size)
|
||||
if (tkn && pos <= size)
|
||||
{
|
||||
t_footstep_t *fs = NULL;
|
||||
|
||||
|
|
@ -1905,7 +1905,7 @@ static boolean K_TERRAINLumpParser(char *data, size_t size)
|
|||
tkn = M_GetToken(NULL);
|
||||
pos = M_GetTokenPos();
|
||||
|
||||
if (tkn && pos < size)
|
||||
if (tkn && pos <= size)
|
||||
{
|
||||
t_overlay_t *o = NULL;
|
||||
|
||||
|
|
@ -1946,7 +1946,7 @@ static boolean K_TERRAINLumpParser(char *data, size_t size)
|
|||
tkn = M_GetToken(NULL);
|
||||
pos = M_GetTokenPos();
|
||||
|
||||
if (tkn && pos < size)
|
||||
if (tkn && pos <= size)
|
||||
{
|
||||
terrain_t *t = NULL;
|
||||
|
||||
|
|
@ -1986,8 +1986,8 @@ static boolean K_TERRAINLumpParser(char *data, size_t size)
|
|||
Z_Free(tkn);
|
||||
tkn = M_GetToken(NULL);
|
||||
pos = M_GetTokenPos();
|
||||
|
||||
if (tkn && pos < size)
|
||||
|
||||
if (tkn && pos <= size)
|
||||
{
|
||||
if (stricmp(tkn, "optional") == 0)
|
||||
{
|
||||
|
|
@ -1998,7 +1998,7 @@ static boolean K_TERRAINLumpParser(char *data, size_t size)
|
|||
pos = M_GetTokenPos();
|
||||
}
|
||||
|
||||
if (tkn && pos < size)
|
||||
if (tkn && pos <= size)
|
||||
{
|
||||
t_floor_t *f = NULL;
|
||||
|
||||
|
|
@ -2027,7 +2027,7 @@ static boolean K_TERRAINLumpParser(char *data, size_t size)
|
|||
tkn = M_GetToken(NULL);
|
||||
pos = M_GetTokenPos();
|
||||
|
||||
if (tkn && pos < size)
|
||||
if (tkn && pos <= size)
|
||||
{
|
||||
terrain_t *t = K_GetTerrainByName(tkn);
|
||||
|
||||
|
|
@ -2072,7 +2072,7 @@ static boolean K_TERRAINLumpParser(char *data, size_t size)
|
|||
tkn = M_GetToken(NULL);
|
||||
pos = M_GetTokenPos();
|
||||
|
||||
if (tkn && pos < size)
|
||||
if (tkn && pos <= size)
|
||||
{
|
||||
terrain_t *t = NULL;
|
||||
|
||||
|
|
@ -2111,7 +2111,7 @@ static boolean K_TERRAINLumpParser(char *data, size_t size)
|
|||
tkn = M_GetToken(NULL);
|
||||
pos = M_GetTokenPos();
|
||||
|
||||
if (tkn && pos < size)
|
||||
if (tkn && pos <= size)
|
||||
{
|
||||
t_footstep_t *fs = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue