mirror of
https://github.com/aseprite/aseprite.git
synced 2024-11-20 14:21:45 +00:00
lua: Palette() ctor by default is a 256 colors palette
This commit is contained in:
parent
4eefcaaa09
commit
d8fb99576e
@ -37,7 +37,8 @@ struct PaletteObj {
|
||||
int Palette_new(lua_State* L)
|
||||
{
|
||||
int ncolors = lua_tointeger(L, 1);
|
||||
push_new<PaletteObj>(L, nullptr, new Palette(0, ncolors));
|
||||
push_new<PaletteObj>(L, nullptr,
|
||||
new Palette(0, ncolors > 0 ? ncolors: 256));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user