From 5db1f95b293385a5219482524615fefa03f05e62 Mon Sep 17 00:00:00 2001 From: nukeykt Date: Sun, 26 Jan 2020 22:26:08 +0900 Subject: [PATCH] Prevent OOB issues in old pushmove --- source/build/src/clip.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/build/src/clip.cpp b/source/build/src/clip.cpp index 34e224e19..45ae15fe4 100644 --- a/source/build/src/clip.cpp +++ b/source/build/src/clip.cpp @@ -1562,6 +1562,8 @@ int pushmove(vec3_t *const vect, int16_t *const sectnum, if (clear) { + if (enginecompatibility_mode != ENGINECOMPATIBILITY_NONE && *sectnum < 0) + return 0; clipsectorlist[0] = *sectnum; clipsectnum = 1;