range check char length
This commit is contained in:
@@ -866,7 +866,8 @@ evaluate_constant:
|
||||
jmp .bin_loop
|
||||
|
||||
.chr:
|
||||
; TODO range check rcx
|
||||
cmp rcx, 4 ; ensure char is only 4 bytes long
|
||||
jg .unrecognised
|
||||
cmp rsi, 1 ; range check
|
||||
je .chr_break
|
||||
|
||||
@@ -896,7 +897,7 @@ evaluate_constant:
|
||||
jmp .chr_break
|
||||
|
||||
.chr_break_for_good:
|
||||
mov dl, [rdi]
|
||||
mov dl, [rdi] ; make sure the chr is closed
|
||||
cmp dl, '"'
|
||||
jne .unrecognised
|
||||
|
||||
|
||||
Reference in New Issue
Block a user