diff lwasm/os9.c @ 560:dba08c7dff96

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 <varmfskii@gmail.com> 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.
author William Astle <lost@l-w.ca>
date Fri, 22 Sep 2023 12:15:09 -0600
parents 928c033c0cd0
children
line wrap: on
line diff
--- 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)