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:
6
File.cc
6
File.cc
@@ -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)};
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user