From 5fbdbaa3bcd821d714eb2065849d006613cae6d0 Mon Sep 17 00:00:00 2001 From: wraitii Date: Sun, 9 May 2021 17:29:50 +0000 Subject: [PATCH] Fix 3af1fc64d2 - incorrect texture path on Windows. sizeof(const char*) returns the pointer size and not the string size, and 'texture:' happend to be 8 characters long, which is the same as a 64-bit pointer but not a 32-bit pointer. Reported by: Stan Differential Revision: https://code.wildfiregames.com/D3947 This was SVN commit r25415. --- source/gui/SettingTypes/MouseEventMask.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gui/SettingTypes/MouseEventMask.cpp b/source/gui/SettingTypes/MouseEventMask.cpp index e8f1eb79f9..3af19ebd0b 100644 --- a/source/gui/SettingTypes/MouseEventMask.cpp +++ b/source/gui/SettingTypes/MouseEventMask.cpp @@ -74,8 +74,8 @@ bool CGUIMouseEventMask::IsMouseOver(const CVector2D& mousePos, const CRect& obj class CGUIMouseEventMaskTexture final : public CGUIMouseEventMask::Impl { public: - static constexpr const char* identifier = "texture:"; - static constexpr size_t specOffset = sizeof(identifier); + static constexpr std::string_view identifier = "texture:"; + static constexpr size_t specOffset = identifier.size(); static std::unique_ptr Create(const std::string& spec) {