# HG changeset patch # User William Astle # Date 1695406509 21600 # Node ID dba08c7dff966fc181bec43a34e2fe7d1b7fd345 # Parent ddc7b05a5675e7e5ce136f8fe7405f8a08861885 Fix off by one handling MOD directive optional arguments Fixes an off by one in handling the optional arguments to the MOD directive as of changeset 928c033c0cd0. Thanks to Alex Evans for reporting the problem and a suggested fix. This fix is different but should be more stable should the rest of the parsing code be refactored in the future. diff -r ddc7b05a5675 -r dba08c7dff96 lwasm/os9.c --- a/lwasm/os9.c Thu Sep 21 13:13:23 2023 -0600 +++ b/lwasm/os9.c Fri Sep 22 12:15:09 2023 -0600 @@ -132,7 +132,7 @@ // init crc as -> inmod = 1; - l -> len = (i == 6) ? 13 : 9; + l -> len = (l -> lint == 6) ? 13 : 9; } EMITFUNC(pseudo_emit_mod)