From f4abaabdd5f461712bcb9f54344a5772b0a2d3ae Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 11 Jan 2024 22:13:11 +0000 Subject: [PATCH] bj_SSHologramRotatorMapThingSpawn: Fix possible div/0 --- src/objects/sealed-star.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/objects/sealed-star.c b/src/objects/sealed-star.c index 4a632147f..bf7b9c342 100644 --- a/src/objects/sealed-star.c +++ b/src/objects/sealed-star.c @@ -98,6 +98,12 @@ void Obj_SSHologramRotatorMapThingSpawn(mobj_t* mo, mapthing_t* mt) token = next; } + if (numStates == 0) + { + CONS_Alert(CONS_WARNING, "MT_HOLOGRAM_ROTATOR %d: stringarg 0 consists exclusively of unrecognised creatures\n", mt->tid); + return; + } + if (mt->thing_args[0]) { speed = mt->thing_args[0];