blueloveTH 2 jaren geleden
bovenliggende
commit
724c3f491c
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      src/io.h

+ 1 - 1
src/io.h

@@ -15,7 +15,7 @@ inline Bytes _read_file_cwd(const Str& name){
     std::filesystem::path path(name.sv());
     std::filesystem::path path(name.sv());
     bool exists = std::filesystem::exists(path);
     bool exists = std::filesystem::exists(path);
     if(!exists) return Bytes();
     if(!exists) return Bytes();
-    std::ifstream ifs(path);
+    std::ifstream ifs(path, std::ios::binary);
     std::vector<char> buffer(std::istreambuf_iterator<char>(ifs), {});
     std::vector<char> buffer(std::istreambuf_iterator<char>(ifs), {});
     ifs.close();
     ifs.close();
     return Bytes(std::move(buffer));
     return Bytes(std::move(buffer));