From e61930c0b13c50479da6398e2b3f1366a203adc5 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 3 Jun 2019 22:25:17 +0200 Subject: [PATCH] clearing unused TriheptaSpecial shapes to fix a crash on iOS --- hyper.h | 1 + polygons.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hyper.h b/hyper.h index 7135ff6c..746784fd 100644 --- a/hyper.h +++ b/hyper.h @@ -4080,6 +4080,7 @@ struct hpcshape { basic_textureinfo *tinf; int texture_offset; int shs, she; + void clear() { s = e = shs = she = texture_offset = 0; prio = PPR::ZERO; tinf = NULL; flags = 0; } }; extern vector shPlainWall3D, shWireframe3D, shWall3D, shMiniWall3D; diff --git a/polygons.cpp b/polygons.cpp index 32b290a3..d1df0488 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -1067,7 +1067,7 @@ void geometry_information::prepare_shapes() { bshape(shAsymmetric, PPR::TEXT, scalefactor, 374); - for(auto& sh: shTriheptaSpecial) sh.s = sh.e = 0; + for(auto& sh: shTriheptaSpecial) sh.clear(); bshape(shTriheptaSpecial[2], PPR::FLOOR, scalefactor, 32); bshape(shTriheptaSpecial[3], PPR::FLOOR, scalefactor, 33);