From 826e6f95a250b7a72a2abcfac9c7c7635f9079a0 Mon Sep 17 00:00:00 2001 From: rr- Date: Wed, 17 Mar 2021 18:29:56 +0100 Subject: [PATCH] fix secrets resetting after using compass (fixes #86) --- src/game/option.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/option.c b/src/game/option.c index 6bfc55b12..1d66d9d25 100644 --- a/src/game/option.c +++ b/src/game/option.c @@ -760,11 +760,12 @@ void DoCompassOption(INVENTORY_ITEM *inv_item) int32_t secrets_taken = 0; int32_t secrets_total = MAX_SECRETS; + int32_t secrets_flags = SaveGame.secrets; do { - if (SaveGame.secrets & 1) { + if (secrets_flags & 1) { secrets_taken++; } - SaveGame.secrets >>= 1; + secrets_flags >>= 1; secrets_total--; } while (secrets_total); sprintf(