From fb7dbd1173bd74f2b3b14087285e4eb2df8a0649 Mon Sep 17 00:00:00 2001 From: James Jones Date: Sat, 11 Apr 2020 22:25:48 -0700 Subject: [PATCH] Properly advance past register bank specifier Register banks, like all constants, are stored in the token stream as uint64_t values. Hence, to advance the stream, the 32-bit tok pointer must be advanced twice after parsing a register bank. --- procln.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/procln.c b/procln.c index be57b7d..8cdcc6a 100644 --- a/procln.c +++ b/procln.c @@ -486,6 +486,11 @@ When checking to see if it's already been equated, issue a warning. registerbank = BANK_0; else if (*(uint64_t *)tok == 1) registerbank = BANK_1; + + // Advance half-way through the 64-bit const. + // The code below, expecting a regular token, + // will advance past the second half. + tok++; } #ifdef DEBODGE_REGBANK -- 2.37.2