0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-29 17:23:01 +00:00

Raise errors on hex literals with zero length

This commit is contained in:
Andrew Alderwick 2021-10-30 07:48:41 +01:00
parent 80b4e4f88d
commit d5f3bc376e
2 changed files with 4 additions and 0 deletions

View file

@ -43,6 +43,9 @@ EOD
expect_failure 'Invalid hexadecimal: #defg' <<'EOD'
|1000 #defg
EOD
expect_failure 'Invalid hexadecimal: #' <<'EOD'
|1000 #
EOD
expect_failure 'Address not in zero page: .hello' <<'EOD'
|1000 @hello
.hello

View file

@ -376,6 +376,7 @@ include projects/library/file-read-chunks.tal
OR 00 otherwise )
;asma/token LDA2 DUP2 ,strlen JSR ( token* length^ )
DUP2 #0004 GTH2 ,&fail2 JCN
ORAk #00 EQU ,&fail2 JCN
&resume
#0002 GTH2 ROT ROT
LIT2r 0000