port fix for std::fread from master - a220bda05d
This commit is contained in:
parent
c1267ebcd5
commit
85da8ef128
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue