diff --git a/src/xml/xml_native_reader.cc b/src/xml/xml_native_reader.cc index 9287ea13..1bdad5b2 100644 --- a/src/xml/xml_native_reader.cc +++ b/src/xml/xml_native_reader.cc @@ -1070,7 +1070,7 @@ void mjXReader::Size(XMLElement* section, mjCModel* mod) { if (*memory / sizeof(mjtNum) > std::numeric_limits::max()) { throw mjXError(section, err_msg); } - mod->memory = static_cast(*memory); + mod->memory = *memory; } }