From 3fda89b6093dd508c08c652c0bc60d42934c3ba4 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 29 Mar 2024 10:42:58 -0700 Subject: [PATCH] (uxnasm) Catch missized #hex --- src/uxnasm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uxnasm.c b/src/uxnasm.c index 780b629..d69c313 100644 --- 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;