From 2beec65493d231f1ed03c8a61117a7cbf4116de9 Mon Sep 17 00:00:00 2001 From: "Brigham Keys, Esq" Date: Fri, 22 Sep 2023 18:11:21 -0400 Subject: [PATCH] Fixed compilation error regarding memory size needing to be integers on some compilers. --- source/platform/renderers/Irrlicht/Irrlicht.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/platform/renderers/Irrlicht/Irrlicht.cpp b/source/platform/renderers/Irrlicht/Irrlicht.cpp index 20dad4f5..ad28b48d 100644 --- a/source/platform/renderers/Irrlicht/Irrlicht.cpp +++ b/source/platform/renderers/Irrlicht/Irrlicht.cpp @@ -241,7 +241,7 @@ namespace Gwk { texData.m_ReadData = deleted_unique_ptr( new unsigned char[texData.width * texData.height * bytes], [](unsigned char* mem) { if (mem) delete[](mem); }); - memcpy(texData.m_ReadData.get(), buffer, texData.width * texData.height * bytes); + memcpy(texData.m_ReadData.get(), buffer, static_cast(texData.width) * static_cast(texData.height) * static_cast(bytes)); texData.readable = true; const irr::video::SColor pixelColor = irr::video::SColor(*(unsigned int*)(buffer + (y * pitch) + (x*bytes))); Texture->unlock();