fixing valgrind issue

This commit is contained in:
2025-06-03 11:57:58 +02:00
parent e72fe826b8
commit 8dfb6af3ec
3 changed files with 47 additions and 7 deletions

View File

@@ -26,9 +26,9 @@ namespace Scop
file.read(reinterpret_cast<char*>(&bpp), sizeof(bpp));
file.seekg(54, std::ios_base::beg);
if(bpp != 24)
Warning("BMP loader: warning while loadeing %, cannot handle yet different color palette sizes", path);
Warning("BMP loader: warning while loading %, cannot handle yet different color palette sizes", path);
CPUBuffer buffer{ dimensions.x * dimensions.y * 4 };
for(std::size_t i = 0; i <= buffer.GetSize(); i += 4)
for(std::size_t i = 0; i < buffer.GetSize(); i += 4)
{
Vec3b data{ 0, 0, 0 };
data.x = (file.eof() ? 0x00 : file.get());