From be19d8240f48da33d9f7de47afb3e2b153451024 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Wed, 28 Feb 2024 23:03:57 +0100 Subject: [PATCH] fix inversion in branch_if (0x08) --- list-rooms.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/list-rooms.cpp b/list-rooms.cpp index db27936..0624893 100644 --- a/list-rooms.cpp +++ b/list-rooms.cpp @@ -1153,10 +1153,9 @@ static void printscript(const char* spaces, const uint8_t* buf, uint32_t scripta } case BRANCH_IF: // 0x08 bool condition; - condition = true; // fall through case BRANCH_IF_NOT: // 0x09 - condition = false; + condition = (instr == BRANCH_IF); // NOTE: this uses sub-instruction chaining, msbit in sub-instr set means last sub-instr // we need to have special cases for sniff, gourds and doggo lists at the moment // TODO: reduce special cases to a minimum (unified parse_subinstr() is at the end)