diff --git a/core/UserMessagePBHelpers.h b/core/UserMessagePBHelpers.h index 7ab47c30..0863348a 100644 --- a/core/UserMessagePBHelpers.h +++ b/core/UserMessagePBHelpers.h @@ -516,7 +516,7 @@ public: CHECK_FIELD_NOT_REPEATED(); std::string scratch; - strncopy(out, msg->GetReflection()->GetStringReference(*msg, field, &buffer).c_str(), size); + strncopy(out, msg->GetReflection()->GetStringReference(*msg, field, &scratch).c_str(), size); return true; }