aboutsummaryrefslogtreecommitdiffstats
path: root/cat.s
diff options
context:
space:
mode:
authorturret <turret@duck.com>2023-09-11 13:11:58 +0000
committerturret <turret@duck.com>2023-09-11 13:11:58 +0000
commit578a36179f1a1b21f7fb7a3d1dce2b1327e5ede2 (patch)
tree7a472c4de870a2c03ded7dc54602a012608fe025 /cat.s
parent60672fe3885d8c51ffb0f07616d41edaa866e0cf (diff)
downloadcat-578a36179f1a1b21f7fb7a3d1dce2b1327e5ede2.tar.gz
cat-578a36179f1a1b21f7fb7a3d1dce2b1327e5ede2.tar.bz2
cat-578a36179f1a1b21f7fb7a3d1dce2b1327e5ede2.zip
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
Diffstat (limited to 'cat.s')
-rw-r--r--cat.s2
1 files changed, 2 insertions, 0 deletions
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