mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-09 01:01:05 +00:00
Fix 3d floor-related crash in software renderer
3d floors can cause the software renderer to set incorrect sprite clipping values that trigger a buffer overflow (and a subsequent crash) when rendering sprites. This commit keeps the clipping values within the view area.
This commit is contained in:
parent
6caa491595
commit
85d68b30bb
1 changed files with 3 additions and 0 deletions
|
@ -289,6 +289,9 @@ namespace swrenderer
|
|||
hzt = min(hzt, clip3DFloor.sclipTop);
|
||||
}
|
||||
|
||||
// Make sure bottom clipping stays within the view size
|
||||
botclip = min<short>(botclip, viewheight);
|
||||
|
||||
if (topclip >= botclip)
|
||||
{
|
||||
spr->Light.BaseColormap = colormap;
|
||||
|
|
Loading…
Reference in a new issue