(uxnasm) Catch missized #hex

This commit is contained in:
Devine Lu Linvega 2024-03-29 10:42:58 -07:00
parent da54634b74
commit 3fda89b609
1 changed files with 2 additions and 2 deletions

View File

@ -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;