changeset 195:383caf808674

Allow relative addressing to ignore a # before the operand
author lost
date Sun, 22 Mar 2009 17:57:39 +0000
parents 0d916bcebb90
children e7309c716059
files lwasm/insn_rel.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/insn_rel.c	Sun Mar 22 17:50:42 2009 +0000
+++ b/lwasm/insn_rel.c	Sun Mar 22 17:57:39 2009 +0000
@@ -38,6 +38,9 @@
 	
 	lwasm_emitop(as, l, instab[opnum].ops[0]);
 
+	if (**p == '#')
+		(*p)++;
+
 	if ((r = lwasm_expr_result2(as, l, p, EXPR_SECTCONST, &v, 0)) < 0)
 		v = 0;
 	else