Fix buffer stomping; retool Makefile.

The Makefile is now useful for building ke(1) to aid in more rapid
development. This works because ke doesn't (yet) need any special
non-system libraries.
This commit is contained in:
2023-10-12 15:15:09 -07:00
parent ba27e132e3
commit 7cec414e3d
7 changed files with 161 additions and 27 deletions

View File

@@ -64,10 +64,10 @@ OptOutFileStream File::Flush()
return std::nullopt;
}
return {new std::ofstream(this->path, this->mode|std::ios::trunc)};
return {new std::ofstream(this->path, std::ios::out|std::ios::trunc)};
}
return {new std::ofstream(this->path, this->mode)};
return {new std::ofstream(this->path, std::ios::out)};
}
@@ -78,7 +78,7 @@ File::Refresh()
return std::nullopt;
}
return {new std::ifstream(this->path, this->mode)};
return {new std::ifstream(this->path, std::ios::in)};
}