diff --git a/src/file.S b/src/file.S index fb828c2..76ccae6 100644 --- a/src/file.S +++ b/src/file.S @@ -40,6 +40,7 @@ cat_file: ecall blez a0, .LCloseFD # if we haven't read any bytes, EOF, close FD mv s2, a0 + li s1, 1 la t1, show_ends lb t1, 0(t1) diff --git a/src/main.S b/src/main.S index d7717a3..def4c09 100644 --- a/src/main.S +++ b/src/main.S @@ -19,7 +19,7 @@ help: .equ HELP_LEN, . - help version: - .ascii "cat 1.1.0\n" + .ascii "cat 1.2.0\n" .ascii "Copyright (C) 2026 lexzach\n" .ascii "License MIT\n" .ascii "This is free software: you are free to change and redistribute it.\n" @@ -61,9 +61,9 @@ _start: addi sp, sp, -8 sd a0, 0(sp) call _is_known_flag - bnez a1, .LSkipArg # check if arg is flag ld a0, 0(sp) addi sp, sp, 8 + bnez a1, .LSkipArg # check if arg is flag call cat_file addi s2, s2, 1 bnez a0, .LReturnFileErr # error if failed