Check null-terminating byte in open_file
This commit is contained in:
parent
9ac938a5f8
commit
544fb12af9
|
@ -337,7 +337,8 @@ open_file:
|
|||
push bx
|
||||
push es
|
||||
|
||||
; Stolen from https://stackoverflow.com/a/72746473, get strlen in cx
|
||||
; Stolen from https://stackoverflow.com/a/72746473, get strlen (including
|
||||
; null-termination) in cx
|
||||
mov cx, ds
|
||||
mov es, cx
|
||||
mov di, si
|
||||
|
@ -345,7 +346,6 @@ open_file:
|
|||
xor ax, ax
|
||||
repne scasb
|
||||
not cx
|
||||
dec cx
|
||||
|
||||
mov es, ax
|
||||
;mov ax, 1
|
||||
|
|
Loading…
Reference in New Issue