Skip to content

Commit 0991893

Browse files
committed
fix load_param_bin, fix #732
1 parent aaa0765 commit 0991893

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ int Net::load_param(const char* protopath)
412412
template<typename T> bool readValue(T & val, FILE * fp)
413413
{
414414
size_t res = fread(&val, sizeof(T), 1, fp);
415-
if (res != sizeof(T)) {
415+
if (res != 1) {
416416
fprintf(stderr, "issue with param file reading\n");
417417
return false;
418418
}

0 commit comments

Comments
 (0)