From f536ab34674fb8d3ee262a0009753f552074305c Mon Sep 17 00:00:00 2001 From: Nev3r Date: Sun, 9 Jun 2019 20:04:07 +0200 Subject: [PATCH] Fixed crash regarding opening reallocating. A thousand thanks go for MonsterIestyn for figuring this out. I carelessly changed the line's drawsegs to curdrawsegs without researching what that piece of code did. --- src/r_segs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_segs.c b/src/r_segs.c index f5f314e6f..6eb81ce7a 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -1796,7 +1796,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) // borrowed fix from *cough* zdoom *cough* // [RH] We also need to adjust the openings pointers that // were already stored in drawsegs. - for (ds = curdrawsegs; ds < ds_p; ds++) + for (ds = drawsegs; ds < ds_p; ds++) { #define ADJUST(p) if (ds->p + ds->x1 >= oldopenings && ds->p + ds->x1 <= oldlast) ds->p = ds->p - oldopenings + openings; ADJUST(maskedtexturecol);