X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=expr.c;h=7cedc41350529f3df19e1ccc61752bc75a824d6d;hb=ab99ead7ff1f6969b1c26876757c14dd1da40648;hp=31eb89974fb0eab6b6ab40bc0ef99597ad5a53e2;hpb=b10167d55798ea184f97fafda075255c0852f3b6;p=rmac diff --git a/expr.c b/expr.c index 31eb899..7cedc41 100644 --- a/expr.c +++ b/expr.c @@ -351,7 +351,7 @@ int expr(TOKEN * otk, VALUE * a_value, WORD * a_attr, SYM ** a_esym) tok--; } - else + else if (*tok == STRING || *tok == SYMBOL) { p = string[tok[1]]; j = (*p == '.' ? curenv : 0); @@ -411,6 +411,13 @@ thrown away right here. What the hell is it for? if ((symbol->sattr & (GLOBAL | DEFINED)) == GLOBAL && a_esym != NULL) *a_esym = symbol; } + else + { + // Unknown type here... Alert the user! + error("undefined RISC register in expression"); + tok++; + return ERROR; + } tok += 2; *evalTokenBuffer++ = ENDEXPR;