Skip to content

Commit

Permalink
Fix std::file.readAll() for other OS
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Nov 20, 2024
1 parent 36d9658 commit fe9dabd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions std/io.rave
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ namespace std {
std::string readLine {
std::string buffer = "";
char ch = this.getc();
while((ch != '\n') && (ch != 0)) {
while((ch != '\n') && (cast(int)ch) != -1) {
buffer.add(ch);
ch = this.getc();
}
Expand All @@ -346,7 +346,7 @@ namespace std {
std::u8string u8ReadLine {
std::u8string buffer = "";
char ch = this.getc();
while((ch != '\n') && (ch != 0)) {
while((ch != '\n') && (cast(int)ch) != -1) {
buffer.add(ch);
ch = this.getc();
}
Expand All @@ -355,7 +355,7 @@ namespace std {
std::string readAll {
std::string buffer = "";
char ch = this.getc();
while(ch != 0) {
while((cast(int)ch) != -1) {
buffer.add(ch);
ch = this.getc();
}
Expand All @@ -364,7 +364,7 @@ namespace std {
std::u8string u8ReadAll {
std::u8string buffer = "";
char ch = this.getc();
while(ch != 0) {
while((cast(int)ch) != -1) {
buffer.add(ch);
ch = this.getc();
}
Expand Down

0 comments on commit fe9dabd

Please sign in to comment.