DXX-Retro icon indicating copy to clipboard operation
DXX-Retro copied to clipboard

Fix observer render attempt past childless sides

Open arbruijn opened this issue 2 years ago • 3 comments

arbruijn avatar Dec 12 '22 17:12 arbruijn

My understanding of C is entry level, but I will ask this anyway. :) Is this check happening in the right spot?

if ( (window_check || !visited[ch]) && ((wid & WID_RENDPAST_FLAG) || (observer && ch >= 0)) ) {

If ch can be less than 0 at this point, then !visited[ch] could potentially fail, even with this check.

roncli avatar Dec 16 '22 21:12 roncli

That's right, but window_check is always 1 so I didn't bother to change it. I can add the check for visited as well if you prefer.

arbruijn avatar Dec 17 '22 11:12 arbruijn

Huh. Those are really weird statements that define window_check and some others... But that's neither here nor there, I would definitely add the check just in case someone somewhere down the line wants window_check to be 0.

roncli avatar Dec 21 '22 21:12 roncli