Update olcPixelGameEngine.h

pull/281/head
karelproer 3 years ago committed by GitHub
parent 12f634007c
commit 21734f9da9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      olcPixelGameEngine.h

@ -195,7 +195,7 @@
Author Author
~~~~~~ ~~~~~~
David Barr, aka javidx9, ©OneLoneCoder 2018, 2019, 2020, 2021, 2022 David Barr, aka javidx9, ©OneLoneCoder 2018, 2019, 2020, 2021, 2022
*/ */
#pragma endregion #pragma endregion
@ -4539,7 +4539,7 @@ namespace olc
spr->width = w; spr->height = h; spr->width = w; spr->height = h;
spr->pColData.resize(spr->width * spr->height); spr->pColData.resize(spr->width * spr->height);
std::memcpy(spr->pColData.data(), bytes, spr->width * spr->height * 4); std::memcpy(spr->pColData.data(), bytes, spr->width * spr->height * 4);
delete[] bytes; stbi_free(bytes);
return olc::rcode::OK; return olc::rcode::OK;
} }
@ -4551,7 +4551,7 @@ namespace olc
} }
#endif #endif
// O------------------------------------------------------------------------------O // O------------------------------------------------------------------------------O
// | START IMAGE LOADER: stb_image.h | // | END IMAGE LOADER: stb_image.h |
// O------------------------------------------------------------------------------O // O------------------------------------------------------------------------------O
#pragma endregion #pragma endregion

Loading…
Cancel
Save