port fix for std::fread from master - a220bda05d

This commit is contained in:
Dane Springmeyer 2017-02-08 13:33:41 -08:00
parent c1267ebcd5
commit 85da8ef128

View file

@ -83,7 +83,8 @@ public:
if (!size_) return nullptr; if (!size_) return nullptr;
std::fseek(file_.get(), 0, SEEK_SET); std::fseek(file_.get(), 0, SEEK_SET);
data_type buffer(new char[size_]); data_type buffer(new char[size_]);
std::fread(buffer.get(), size_, 1, file_.get()); auto count = std::fread(buffer.get(), size_, 1, file_.get());
if (count != 1) return nullptr;
return buffer; return buffer;
} }
private: private: