Skip to content

Commit

Permalink
Fix std::feof()
Browse files Browse the repository at this point in the history
  • Loading branch information
vtereshkov committed Dec 19, 2024
1 parent 938eea7 commit 7497aa0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion playground/umka.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions runtime/std.um
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ fn feof*(f: File): bool {
if f == null {
return true
}
eof := bool(rtlfeof(f))
return eof
return rtlfeof(f) != 0
}

fn rtlfflush(f: File): int
Expand Down
3 changes: 1 addition & 2 deletions src/umka_runtime_src.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ static const char *runtimeModuleSources[] = {
" if f == null {\n"
" return true\n"
" }\n"
" eof := bool(rtlfeof(f)) \n"
" return eof\n"
" return rtlfeof(f) != 0\n"
"}\n"
"\n"
"fn rtlfflush(f: File): int\n"
Expand Down

0 comments on commit 7497aa0

Please sign in to comment.