From cd3ba570dff5ed2ea2c6a95fe72ea0680b24139f Mon Sep 17 00:00:00 2001 From: Techjar Date: Thu, 30 May 2019 15:56:47 -0400 Subject: [PATCH] VideoCommon/ShaderGenCommon: Fix memcmp size in ShaderUid operators --- Source/Core/VideoCommon/ShaderGenCommon.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/ShaderGenCommon.h b/Source/Core/VideoCommon/ShaderGenCommon.h index de6e74e8d3..12fa76fb72 100644 --- a/Source/Core/VideoCommon/ShaderGenCommon.h +++ b/Source/Core/VideoCommon/ShaderGenCommon.h @@ -69,7 +69,7 @@ public: bool operator==(const ShaderUid& obj) const { - return memcmp(&data, &obj.data, data.NumValues() * sizeof(data)) == 0; + return memcmp(GetUidData(), obj.GetUidData(), GetUidDataSize()) == 0; } bool operator!=(const ShaderUid& obj) const { return !operator==(obj); } @@ -77,7 +77,7 @@ public: // determines the storage order inside STL containers bool operator<(const ShaderUid& obj) const { - return memcmp(&data, &obj.data, data.NumValues() * sizeof(data)) < 0; + return memcmp(GetUidData(), obj.GetUidData(), GetUidDataSize()) < 0; } // Returns a pointer to an internally stored object of the uid_data type.