mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-12 03:14:04 +02:00
sizeof(unsigned char)
This commit is contained in:
@@ -1982,7 +1982,7 @@ int LuaScriptInterface::simulation_brush(lua_State * l)
|
|||||||
lua_pushnumber(l, sizeY);
|
lua_pushnumber(l, sizeY);
|
||||||
lua_pushnumber(l, 0);
|
lua_pushnumber(l, 0);
|
||||||
lua_pushnumber(l, 0);
|
lua_pushnumber(l, 0);
|
||||||
int bitmapSize = sizeX * sizeY;
|
int bitmapSize = sizeX * sizeY * sizeof(unsigned char);
|
||||||
void *bitmapCopy = lua_newuserdata(l, bitmapSize);
|
void *bitmapCopy = lua_newuserdata(l, bitmapSize);
|
||||||
memcpy(bitmapCopy, brushList[brushID]->GetBitmap(), bitmapSize);
|
memcpy(bitmapCopy, brushList[brushID]->GetBitmap(), bitmapSize);
|
||||||
brushList[brushID]->SetRadius(tempRadius);
|
brushList[brushID]->SetRadius(tempRadius);
|
||||||
|
Reference in New Issue
Block a user