Check null-terminating byte in open_file

This commit is contained in:
shikhin 2023-03-26 20:07:53 +05:30
parent 9ac938a5f8
commit 544fb12af9
1 changed files with 2 additions and 2 deletions

View File

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