Skip to content

Commit

Permalink
init data in createCheckerTexture with empty unint8_t
Browse files Browse the repository at this point in the history
  • Loading branch information
arozx committed Feb 26, 2025
1 parent 3c1bb87 commit 921df88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Scripting/LuaScriptSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ void LuaScriptSystem::RegisterEngineAPI() {

engine.set_function("createCheckerTexture", []() {
const int width = 8, height = 8;
uint8_t data[width * height * 4];
uint8_t data[width * height * 4] = {0};
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
int index = (y * width + x) * 4;
Expand Down

0 comments on commit 921df88

Please sign in to comment.