Merge pull request #3159 from aws-lumberyard-dev/MPWeaponsSQ

Fixed assert about memory override when logged string is longer than …
monroegm-disable-blank-issue-2
SergeyAMZN 4 years ago committed by GitHub
commit 5f8e970700
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -851,7 +851,8 @@ bool CLog::LogToMainThread(const char* szString, ELogType logType, bool bAdd, SL
{
// When logging from other thread then main, push all log strings to queue.
SLogMsg msg;
azstrcpy(msg.msg, AZ_ARRAY_SIZE(msg.msg), szString);
constexpr size_t maxArraySize = AZ_ARRAY_SIZE(msg.msg);
azstrncpy(msg.msg, maxArraySize, szString, maxArraySize - 1);
msg.bAdd = bAdd;
msg.destination = destination;
msg.logType = logType;

Loading…
Cancel
Save