mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
utf8decoder: Use byte-sized byte argument
This prevents passing a negative value out of a signed char by accident. Also renders some casts in the code superfluous.
This commit is contained in:
5
test/asm/invalid-utf-8.asm
Normal file
5
test/asm/invalid-utf-8.asm
Normal file
@@ -0,0 +1,5 @@
|
||||
; This test tries to pass invalid UTF-8 through a macro argument
|
||||
; to exercise the lexer's reportGarbageChar
|
||||
m:MACRO \1
|
||||
ENDM
|
||||
m <EFBFBD><EFBFBD>
|
||||
5
test/asm/invalid-utf-8.err
Normal file
5
test/asm/invalid-utf-8.err
Normal file
@@ -0,0 +1,5 @@
|
||||
ERROR: invalid-utf-8.asm(4) -> invalid-utf-8.asm::m(3):
|
||||
Unknown character 0xCF
|
||||
ERROR: invalid-utf-8.asm(4) -> invalid-utf-8.asm::m(3):
|
||||
Unknown character 0xD3
|
||||
error: Assembly aborted (2 errors)!
|
||||
0
test/asm/invalid-utf-8.out
Normal file
0
test/asm/invalid-utf-8.out
Normal file
Reference in New Issue
Block a user