Fix cat and wc

Trying to fit 64K onto stack was a bad idea.
This commit is contained in:
2026-08-25 23:07:54 +03:00
parent 532d8e757b
commit ae7af6e6cf
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
#define BLOCK_SIZE 65536
exit_code_t pass(uint64_t fd) {
char buffer[BLOCK_SIZE];
static char buffer[BLOCK_SIZE];
uint64_t bytes;
while ((bytes = read(fd, BLOCK_SIZE, buffer))) {
if (bytes == (uint64_t)-1) {
+1 -1
View File
@@ -6,7 +6,7 @@
#define BLOCK_SIZE 65536
exit_code_t pass(uint64_t fd) {
char buffer[BLOCK_SIZE];
static char buffer[BLOCK_SIZE];
uint64_t bytes;
uint64_t total = 0;
while ((bytes = read(fd, BLOCK_SIZE, buffer))) {