From 75bcec411eb5aef9713a6f51907be0c36df0fd78 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 24 Mar 2016 18:26:27 +0100 Subject: [PATCH] - fixed: The portal blockmap's AddLineIntercepts methods needs to check the block's range. --- src/portal.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/portal.cpp b/src/portal.cpp index de2d1d14b..ad8e166b1 100644 --- a/src/portal.cpp +++ b/src/portal.cpp @@ -155,6 +155,8 @@ static void BuildBlockmap() void FLinePortalTraverse::AddLineIntercepts(int bx, int by) { + if (by < 0 || by >= bmapheight || bx < 0 || bx >= bmapwidth) return; + FPortalBlock &block = PortalBlockmap(bx, by); for (unsigned i = 0; i