diff --git a/components/esm/esmcommon.hpp b/components/esm/esmcommon.hpp index e4f3b636d1..bb4069d262 100644 --- a/components/esm/esmcommon.hpp +++ b/components/esm/esmcommon.hpp @@ -110,7 +110,7 @@ struct FIXED_STRING<4> : public FIXED_STRING_BASE void assign(const std::string& value) { intval = 0; - std::memcpy(data, value.data(), std::min(value.size(), 4)); + std::memcpy(data, value.data(), (value.size() < 4)? value.size(): 4); }