mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 10:37:41 -04:00
Fix a cast error and check UUID size.
This commit is contained in:
@ -977,7 +977,7 @@ void NetVaultNodeFieldArray::GetFieldValueString_LCS (
|
||||
case NetVaultNode::kUuid_2:
|
||||
case NetVaultNode::kUuid_3:
|
||||
case NetVaultNode::kUuid_4: {
|
||||
plString tmp = plUUID((char*)fieldAddr).AsString();
|
||||
plString tmp = reinterpret_cast<plUUID*>(fieldAddr)->AsString();
|
||||
|
||||
StrPrintf(dst, dstChars, L"hextoraw('%s')", tmp.c_str());
|
||||
}
|
||||
|
@ -42,6 +42,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
#include "pnUUID.h"
|
||||
#include "hsStream.h"
|
||||
|
||||
static_assert(sizeof(plUUID) == sizeof(uint8_t[16]), "plUUID Must be the same size as a UUID");
|
||||
|
||||
const plUUID kNilUuid;
|
||||
|
||||
plUUID::plUUID()
|
||||
|
@ -45,6 +45,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include <uuid/uuid.h>
|
||||
|
||||
// Check UUID size
|
||||
static_assert(sizeof(plUUID) == sizeof(uuid_t), "plUUID and uuid_t types differ in size");
|
||||
|
||||
struct plUUIDHelper
|
||||
{
|
||||
static inline void CopyToPlasma( plUUID * dst, const uuid_t & src )
|
||||
|
@ -43,10 +43,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#ifdef HS_BUILD_FOR_WIN32
|
||||
|
||||
|
||||
|
||||
#include <rpc.h>
|
||||
|
||||
// Check UUID size
|
||||
static_assert(sizeof(plUUID) == sizeof(GUID), "plUUID and Win32 GUID types differ in size");
|
||||
|
||||
void plUUID::Clear()
|
||||
{
|
||||
UuidCreateNil( (GUID *)this );
|
||||
|
Reference in New Issue
Block a user