mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-27 15:04:31 +00:00
fix(userspace/libc): fopen should set buffer_pos to -1
This change is a fix for fread() because it needs to pass the if statement: "if (stream->buffer_pos >= stream->buffer_size)" Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
parent
d7cbeb9eba
commit
74ff9579f3
@ -217,7 +217,7 @@ export FILE *fopen(const char *restrict pathname, const char *restrict mode)
|
||||
file->fd = fd;
|
||||
file->buffer = malloc(4096);
|
||||
file->buffer_size = 4096;
|
||||
file->buffer_pos = 0;
|
||||
file->buffer_pos = -1;
|
||||
file->flags = flags;
|
||||
file->error = 0;
|
||||
file->eof = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user