mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 21:41:03 +00:00
- fixed bad clamp in software renderer
This one can have its upper bound below its lower bound which triggers the validation within std::clamp. Fixes #2125
This commit is contained in:
parent
52ec2b2a5b
commit
fbf7d1025a
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ namespace swrenderer
|
|||
{
|
||||
for (int j = x1; j < x2; ++j)
|
||||
{
|
||||
down[j] = clamp(most3.ScreenY[j], up[j], dwal[j]);
|
||||
down[j] = max(min(most3.ScreenY[j], up[j]), dwal[j]); // this cannot use clamp due to failing range checks.
|
||||
}
|
||||
ProcessNormalWall(up, down, texcoords);
|
||||
up = down;
|
||||
|
|
Loading…
Reference in a new issue