From 21734f9da92eeecb9300ddf2a9c90ab5c390ce24 Mon Sep 17 00:00:00 2001 From: karelproer <104587757+karelproer@users.noreply.github.com> Date: Thu, 28 Apr 2022 19:15:00 +0200 Subject: [PATCH] Update olcPixelGameEngine.h --- olcPixelGameEngine.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/olcPixelGameEngine.h b/olcPixelGameEngine.h index fd077c4..cc89610 100644 --- a/olcPixelGameEngine.h +++ b/olcPixelGameEngine.h @@ -195,7 +195,7 @@ Author ~~~~~~ - David Barr, aka javidx9, ©OneLoneCoder 2018, 2019, 2020, 2021, 2022 + David Barr, aka javidx9, ©OneLoneCoder 2018, 2019, 2020, 2021, 2022 */ #pragma endregion @@ -4539,7 +4539,7 @@ namespace olc spr->width = w; spr->height = h; spr->pColData.resize(spr->width * spr->height); std::memcpy(spr->pColData.data(), bytes, spr->width * spr->height * 4); - delete[] bytes; + stbi_free(bytes); return olc::rcode::OK; } @@ -4551,7 +4551,7 @@ namespace olc } #endif // O------------------------------------------------------------------------------O -// | START IMAGE LOADER: stb_image.h | +// | END IMAGE LOADER: stb_image.h | // O------------------------------------------------------------------------------O #pragma endregion