From dd8f7eb9f23c82165dcde24409eb2451697fb282 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Tue, 4 Mar 2025 10:42:22 -0500 Subject: [PATCH] Fix crash when VIBR releases heat during explosion --- src/simulation/elements/VIBR.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulation/elements/VIBR.cpp b/src/simulation/elements/VIBR.cpp index ab6b261aa..ab1d8494f 100644 --- a/src/simulation/elements/VIBR.cpp +++ b/src/simulation/elements/VIBR.cpp @@ -105,7 +105,7 @@ int Element_VIBR_update(UPDATE_FUNC_ARGS) auto rx = rndstore%7-3; auto ry = (rndstore>>3)%7-3; auto r = pmap[y+ry][x+rx]; - if (TYP(r) && TYP(r) != PT_VIBR && TYP(r) != PT_BVBR && (!sim->IsHeatInsulator(parts[r]))) + if (TYP(r) && TYP(r) != PT_VIBR && TYP(r) != PT_BVBR && (!sim->IsHeatInsulator(parts[ID(r)]))) { parts[ID(r)].temp = restrict_flt(parts[ID(r)].temp + parts[i].tmp * 3, MIN_TEMP, MAX_TEMP); parts[i].tmp = 0;