From 099189384fe3f8f97bd6054ac862007229da8f9b Mon Sep 17 00:00:00 2001 From: nihuini Date: Fri, 28 Dec 2018 19:50:28 +0800 Subject: [PATCH] fix load_param_bin, fix #732 --- src/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index 1676d8a55eb..365dd6aa160 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -412,7 +412,7 @@ int Net::load_param(const char* protopath) template 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; }