PR comments
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -338,9 +338,9 @@ namespace AZStd
|
||||
if (srcLen > 0)
|
||||
{
|
||||
char* endStr = Internal::WCharTPlatformConverter<>::to_string(dest, destSize, str, str + srcLen);
|
||||
if (endStr < (dest + destSize) && *(endStr - 1) != '\0')
|
||||
if (endStr < (dest + destSize))
|
||||
{
|
||||
*endStr = '\0'; // copy null terminator
|
||||
*endStr = '\0'; // null terminator
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -495,9 +495,9 @@ namespace AZStd
|
||||
if (srcLen > 0)
|
||||
{
|
||||
wchar_t* endWStr = Internal::WCharTPlatformConverter<>::to_wstring(dest, destSize, str, str + srcLen);
|
||||
if (endWStr < (dest + destSize) && *(endWStr - 1) != '\0')
|
||||
if (endWStr < (dest + destSize))
|
||||
{
|
||||
*endWStr = '\0'; // copy null terminator
|
||||
*endWStr = '\0'; // null terminator
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace AZ
|
||||
|
||||
SharedMemory_Common::CreateResult SharedMemory_Windows::Create(const char* name, unsigned int size, bool openIfCreated)
|
||||
{
|
||||
azstrncpy(m_name, AZ_ARRAY_SIZE(m_name), name, strlen(name));
|
||||
AZStd::fixed_wstring<256> fullName;
|
||||
ComposeName(fullName, name, L"Mutex");
|
||||
|
||||
@@ -67,6 +68,7 @@ namespace AZ
|
||||
|
||||
bool SharedMemory_Windows::Open(const char* name)
|
||||
{
|
||||
azstrncpy(m_name, AZ_ARRAY_SIZE(m_name), name, strlen(name));
|
||||
AZStd::fixed_wstring<256> fullName;
|
||||
ComposeName(fullName, name, L"Mutex");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user