mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Improve diagnostic printing of slopalookup overflows
git-svn-id: https://svn.eduke32.com/eduke32@8419 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b71ef4a140
commit
0d7fc1263e
1 changed files with 18 additions and 8 deletions
|
@ -3527,7 +3527,7 @@ static void fgrouscan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat)
|
|||
shy1 = y1+(shoffs>>15);
|
||||
if ((unsigned)shy1 >= SLOPALOOKUPSIZ-1)
|
||||
{
|
||||
OSD_Printf("%s:%d: slopalookup[] overflow drawing sector %d!\n", EDUKE32_FUNCTION, __LINE__, sectnum);
|
||||
OSD_Printf("%s:%d: slopalookup[%" PRId32 "] overflow drawing sector %d!\n", EDUKE32_FUNCTION, __LINE__, shy1, sectnum);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3542,10 +3542,15 @@ static void fgrouscan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat)
|
|||
shy1 = y1+(shoffs>>15);
|
||||
shy2 = y2+(shoffs>>15);
|
||||
|
||||
if ((unsigned)shy1 >= SLOPALOOKUPSIZ || (unsigned)shy2 >= SLOPALOOKUPSIZ)
|
||||
// Ridiculously steep gradient?
|
||||
if ((unsigned)shy1 >= SLOPALOOKUPSIZ)
|
||||
{
|
||||
// Ridiculously steep gradient?
|
||||
OSD_Printf("%s:%d: slopalookup[] overflow drawing sector %d!\n", EDUKE32_FUNCTION, __LINE__, sectnum);
|
||||
OSD_Printf("%s:%d: slopalookup[%" PRId32 "] overflow drawing sector %d!\n", EDUKE32_FUNCTION, __LINE__, shy1, sectnum);
|
||||
goto next_most;
|
||||
}
|
||||
if ((unsigned)shy2 >= SLOPALOOKUPSIZ)
|
||||
{
|
||||
OSD_Printf("%s:%d: slopalookup[%" PRId32 "] overflow drawing sector %d!\n", EDUKE32_FUNCTION, __LINE__, shy2, sectnum);
|
||||
goto next_most;
|
||||
}
|
||||
|
||||
|
@ -3832,7 +3837,7 @@ static void grouscan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat)
|
|||
shy1 = y1+(shoffs>>15);
|
||||
if ((unsigned)shy1 >= SLOPALOOKUPSIZ - 1)
|
||||
{
|
||||
OSD_Printf("%s:%d: slopalookup[] overflow drawing sector %d!\n", EDUKE32_FUNCTION, __LINE__, sectnum);
|
||||
OSD_Printf("%s:%d: slopalookup[%" PRId32 "] overflow drawing sector %d!\n", EDUKE32_FUNCTION, __LINE__, shy1, sectnum);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3847,10 +3852,15 @@ static void grouscan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat)
|
|||
shy1 = y1+(shoffs>>15);
|
||||
shy2 = y2+(shoffs>>15);
|
||||
|
||||
if ((unsigned)shy1 >= SLOPALOOKUPSIZ || (unsigned)shy2 >= SLOPALOOKUPSIZ)
|
||||
// Ridiculously steep gradient?
|
||||
if ((unsigned)shy1 >= SLOPALOOKUPSIZ)
|
||||
{
|
||||
// Ridiculously steep gradient?
|
||||
OSD_Printf("%s:%d: slopalookup[] overflow drawing sector %d!\n", EDUKE32_FUNCTION, __LINE__, sectnum);
|
||||
OSD_Printf("%s:%d: slopalookup[%" PRId32 "] overflow drawing sector %d!\n", EDUKE32_FUNCTION, __LINE__, shy1, sectnum);
|
||||
goto next_most;
|
||||
}
|
||||
if ((unsigned)shy2 >= SLOPALOOKUPSIZ)
|
||||
{
|
||||
OSD_Printf("%s:%d: slopalookup[%" PRId32 "] overflow drawing sector %d!\n", EDUKE32_FUNCTION, __LINE__, shy2, sectnum);
|
||||
goto next_most;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue