aboutsummaryrefslogtreecommitdiff
path: root/tr8as.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-11 18:20:19 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-11 18:20:19 +0100
commitb2489c87ee1ca3ee28f260cb7b1972da1181f44e (patch)
tree222325521ef205a303b4b4324f6832f21a4db102 /tr8as.c
parente316dc79408850e55b06d088a00d403bd7c24e25 (diff)
downloadtr8vm-b2489c87ee1ca3ee28f260cb7b1972da1181f44e.tar.gz
tr8vm-b2489c87ee1ca3ee28f260cb7b1972da1181f44e.zip
Equivalent code
Diffstat (limited to 'tr8as.c')
-rw-r--r--tr8as.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tr8as.c b/tr8as.c
index a32839e..ed6659a 100644
--- a/tr8as.c
+++ b/tr8as.c
@@ -713,9 +713,9 @@ static uint8_t parse_dw(As *as, char **c)
if (wlen == 0)
return error_l("Syntax error", &as->loc, "expected immediate");
- if (!next_imm(as, word, &imm))
- if (!new_ref(as, word, 0xffff, as->addr))
- return 0;
+ if (!next_imm(as, word, &imm)
+ && !new_ref(as, word, 0xffff, as->addr))
+ return 0;
as->out[as->addr++] = imm & 0xff;
as->out[as->addr++] = imm >> 8;