From 7c7f258c2d3f68b147e3cbf366a05db03e6c7f8f Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 5 Dec 2019 09:28:28 +0000 Subject: [PATCH] Another potential papersprite crash fix, but way more confident about this one. --- src/r_things.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/r_things.c b/src/r_things.c index 90d5f3fd3..0def36d8a 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1340,9 +1340,10 @@ static void R_ProjectSprite(mobj_t *thing) if ((range = x2 - x1) <= 0) return; + range++; // fencepost problem + scalestep = (yscale2 - yscale)/range; - scalestep = scalestep ? scalestep : 1; - xscale = FixedDiv(range<