Bugfix for newline exit
When stdin is close instead of pressing enter
This commit is contained in:
parent
5929efa54b
commit
4432178af9
1 changed files with 2 additions and 1 deletions
|
@ -230,19 +230,20 @@ main_loop:
|
|||
jmp main_loop ; main_loop
|
||||
|
||||
flush_stdin:
|
||||
jz newline_exit
|
||||
xor rax, rax
|
||||
;xor rdi, rdi ; done in main_loop
|
||||
;mov rsi, r14
|
||||
;mov rdx, 1
|
||||
syscall
|
||||
test al, al
|
||||
jz newline_exit
|
||||
jns flush_stdin
|
||||
|
||||
xor rbx, rbx ; EXIT OK
|
||||
jmp exit
|
||||
|
||||
newline_exit:
|
||||
mov rdi, 2 ; stderr
|
||||
call proc_nl
|
||||
xor rbx, rbx ; exit OK
|
||||
jmp exit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue