From 73a3e9d5bb3a12812926b487a17c36dd4381ebc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Thu, 8 Oct 2020 21:46:00 +0300 Subject: Fixes, some thanks to ASan --- src/render/Occlusion.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/render/Occlusion.cpp') diff --git a/src/render/Occlusion.cpp b/src/render/Occlusion.cpp index 1ea9da50..79ce0461 100644 --- a/src/render/Occlusion.cpp +++ b/src/render/Occlusion.cpp @@ -366,6 +366,12 @@ COcclusion::ProcessBeforeRendering(void) } NumActiveOccluders--; i--; + // Taken from Mobile! +#ifdef FIX_BUGS + if (i == -1) { + i = 0; + } +#endif } } } @@ -481,4 +487,4 @@ void COcclusion::Render() { DefinedState(); } -#endif \ No newline at end of file +#endif -- cgit v1.2.3