Fixes #15, file opened are now opened as binary.

This commit is contained in:
eidheim 2015-09-03 08:37:35 +02:00
commit c9f8a59a4d
2 changed files with 2 additions and 2 deletions

View file

@ -94,7 +94,7 @@ int main() {
path+="/index.html"; path+="/index.html";
if(boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path)) { if(boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path)) {
ifstream ifs; ifstream ifs;
ifs.open(path.string(), ifstream::in); ifs.open(path.string(), ifstream::in | ios::binary);
if(ifs) { if(ifs) {
ifs.seekg(0, ios::end); ifs.seekg(0, ios::end);

View file

@ -94,7 +94,7 @@ int main() {
path+="/index.html"; path+="/index.html";
if(boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path)) { if(boost::filesystem::exists(path) && boost::filesystem::is_regular_file(path)) {
ifstream ifs; ifstream ifs;
ifs.open(path.string(), ifstream::in); ifs.open(path.string(), ifstream::in | ios::binary);
if(ifs) { if(ifs) {
ifs.seekg(0, ios::end); ifs.seekg(0, ios::end);