From 45b6317e69d676889abb200bc5e4cdf978be6e10 Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Fri, 9 Jul 2021 20:51:07 -0700 Subject: [PATCH] Fix crash after using Orb of Domination --- complex.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/complex.cpp b/complex.cpp index f04399d6..fb004bb3 100644 --- a/complex.cpp +++ b/complex.cpp @@ -2597,7 +2597,7 @@ EX } EX namespace dragon { EX int whichturn; // which turn has the target been set on - EX cell *target; // actually for all Orb of Control + EX cell *target; // actually for all Orb of Domination void pullback(cell *c) { int maxlen = iteration_limit; @@ -3467,6 +3467,7 @@ auto ccm = addHook(hooks_clearmemory, 0, [] () { clearing::score.clear(); tortoise::emap.clear(); tortoise::babymap.clear(); + dragon::target = NULL; #if CAP_FIELD prairie::lasttreasure = NULL; prairie::enter = NULL; @@ -3510,6 +3511,7 @@ auto ccm = addHook(hooks_clearmemory, 0, [] () { } return false; }); + set_if_removed(dragon::target, NULL); #if CAP_FIELD set_if_removed(prairie::lasttreasure, NULL); set_if_removed(prairie::enter, NULL);