Mercurial > hg-old > index.cgi
diff lwasm/pseudo.c @ 414:010fb62b9f18
Fixed off by one bug in code generation for fcn
author | lost@l-w.ca |
---|---|
date | Tue, 10 Aug 2010 17:33:56 -0600 |
parents | b30a77f0b685 |
children |
line wrap: on
line diff
--- a/lwasm/pseudo.c Mon Aug 09 20:57:02 2010 -0600 +++ b/lwasm/pseudo.c Tue Aug 10 17:33:56 2010 -0600 @@ -283,14 +283,14 @@ l -> lstr = lw_strndup(*p, i); (*p) += i + 1; - l -> len = i; + l -> len = i + 1; } EMITFUNC(pseudo_emit_fcn) { int i; - for (i = 0; i < l -> len; i++) + for (i = 0; i < (l -> len - 1); i++) lwasm_emit(l, l -> lstr[i]); lwasm_emit(l, 0); }