mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Mapster32/C++ build/non-Lua: probably fix a crash in showsectordata().
Reported in http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__view__findpost__p__220722 I could not reproduce it, but it is thinkable that 'searchsector' could have been out-of-sync with the 'sectnum' local. (For example, the former one could have been -1, triggering the crash.) git-svn-id: https://svn.eduke32.com/eduke32@5132 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
25402be9f2
commit
f74b38bcd8
1 changed files with 3 additions and 4 deletions
|
@ -10188,12 +10188,11 @@ void printcoords16(int32_t posxe, int32_t posye, int16_t ange)
|
|||
|
||||
void showsectordata(int16_t sectnum, int16_t small)
|
||||
{
|
||||
sectortype *sec;
|
||||
char snotbuf[80];
|
||||
int32_t col=0; //,row = 0;
|
||||
int32_t color = small ? whitecol : editorcolors[11];
|
||||
|
||||
sec = §or[sectnum];
|
||||
const sectortype *const sec = §or[sectnum];
|
||||
|
||||
if (small)
|
||||
{
|
||||
|
@ -10218,7 +10217,7 @@ void showsectordata(int16_t sectnum, int16_t small)
|
|||
{
|
||||
int32_t xp=sec->ceilingxpanning, yp=sec->ceilingypanning;
|
||||
#ifdef YAX_ENABLE__COMPAT
|
||||
if (yax_getbunch(searchsector, YAX_CEILING) >= 0)
|
||||
if (yax_getbunch(sectnum, YAX_CEILING) >= 0)
|
||||
xp = yp = 0;
|
||||
#endif
|
||||
DOPRINT(56, "(X,Y)pan: %d, %d", xp, yp);
|
||||
|
@ -10239,7 +10238,7 @@ void showsectordata(int16_t sectnum, int16_t small)
|
|||
{
|
||||
int32_t xp=sec->floorxpanning, yp=sec->floorypanning;
|
||||
#ifdef YAX_ENABLE__COMPAT
|
||||
if (yax_getbunch(searchsector, YAX_FLOOR) >= 0)
|
||||
if (yax_getbunch(sectnum, YAX_FLOOR) >= 0)
|
||||
xp = yp = 0;
|
||||
#endif
|
||||
DOPRINT(56, "(X,Y)pan: %d, %d", xp, yp);
|
||||
|
|
Loading…
Reference in a new issue