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.
This commit is contained in:
wraitii 2021-05-09 17:29:50 +00:00
parent b4d11bda89
commit 5fbdbaa3bc

View File

@ -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<CGUIMouseEventMaskTexture> Create(const std::string& spec)
{