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; }