commit e47a14f6738b90e9fa57ba4ff9ee0252bc35aa3c
parent 68d6a5f604e51bc367d2cf41da0a90d30d6cf9dd
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date: Fri, 29 Mar 2024 10:43:22 -0700
(uxnasm) Catch missized #hex
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/uxnasm.c b/src/uxnasm.c
@@ -258,9 +258,9 @@ writehex(char *w, Context *ctx)
{
if(*w == '#')
writebyte(findopcode("LIT") | !!(++w)[2] << 5, ctx);
- if(!w[2])
+ if(w[1] && !w[2])
return writebyte(shex(w), ctx);
- else if(!w[4])
+ else if(w[3] && !w[4])
return writeshort(shex(w));
else
return 0;