Mercurial > hg > index.cgi
changeset 404:f6e03c2cebfb
Fix "rlist" to recognize comments as end of operand
Fix "rlist" to recognize comments as the end of the operand instead of
trying to parse a comment character as an additional register specification.
author | William Astle <lost@l-w.ca> |
---|---|
date | Thu, 15 Oct 2015 23:21:26 -0600 |
parents | f5a88f147fae |
children | 4c8925f97eb5 |
files | lwasm/insn_rlist.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lwasm/insn_rlist.c Thu Oct 15 20:20:20 2015 -0600 +++ b/lwasm/insn_rlist.c Thu Oct 15 23:21:26 2015 -0600 @@ -33,7 +33,7 @@ int rn; static const char *regs = "CCA B DPX Y U PCD S "; - while (**p && !isspace(**p)) + while (**p && !isspace(**p) && **p != ';' && **p != '*') { rn = lwasm_lookupreg2(regs, p); if (rn < 0) @@ -42,7 +42,7 @@ return; } lwasm_skip_to_next_token(l, p); - if (**p && **p != ',' && !isspace(**p)) + if (**p && **p != ',' && !isspace(**p) && **p != ';' && **p != '*') { lwasm_register_error(as, l, E_OPERAND_BAD); }