]> Shamusworld >> Repos - rmac/commit - parmode.h
Fixed subtle bug in expr().
authorShamus Hammons <jlhamm@acm.org>
Sat, 9 Nov 2013 15:01:57 +0000 (09:01 -0600)
committerShamus Hammons <jlhamm@acm.org>
Sat, 9 Nov 2013 15:01:57 +0000 (09:01 -0600)
commit75969398d9b8a9f82ea76fc4e4cbfb97b11160a4
tree54fc57124bc783a07fedbf7aaa168d8804a011e8
parent6c1bc379012b1c1ca369e71e39509f3538042382
Fixed subtle bug in expr().

Basically, expr() was looking at the token following the one it was
looking at and bypassing the longer parse path if it found an EOL token
there. Problem is, some tokens have follow on values and so can be
considered compound tokens. In this case, the EOL token codes to 101,
having a constant with a value of 101 will not evaluate correctly in
this case as the CONST token is a compound token.

The short of this is that making assumptions is BAD! Don't do it! It
WILL come around to bite you in the ass eventually, in the form of
subtle bugs that are difficult to chase down. Assume nothing!
direct.c
error.c
expr.c
mach.c
parmode.h
procln.c
token.c
version.h