From 578a36179f1a1b21f7fb7a3d1dce2b1327e5ede2 Mon Sep 17 00:00:00 2001 From: turret Date: Mon, 11 Sep 2023 13:11:58 +0000 Subject: cat: fix issues with new system - -E test works (as perscribed by gnu) - buf shouldnt be getting cut off - buf shouldnt be injecting additional characters --- cat.s | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cat.s b/cat.s index 0c8daa5..83509a4 100644 --- a/cat.s +++ b/cat.s @@ -28,6 +28,7 @@ process_fd: cmp rcx, 0x0a jne .skipshowends call .flushbuf + xor rcx, rcx mov rcx, "$" mov [smallbuf], rcx mov rax, smallbuf @@ -63,6 +64,7 @@ process_fd: .contrwloop: ; continue loop + dec r10 call .flushbuf mov rax, rbx jmp process_fd -- cgit v1.2.3