Skip to content

Commit

Permalink
fix load_param_bin, fix Tencent#732
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Dec 28, 2018
1 parent aaa0765 commit 0991893
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ int Net::load_param(const char* protopath)
template<typename T> bool readValue(T & val, FILE * fp)
{
size_t res = fread(&val, sizeof(T), 1, fp);
if (res != sizeof(T)) {
if (res != 1) {
fprintf(stderr, "issue with param file reading\n");
return false;
}
Expand Down

0 comments on commit 0991893

Please sign in to comment.