mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 09:56:59 +00:00
[lua] Fix layer iteration when some layer name contains just a number (fix #3045)
This commit is contained in:
parent
a0bea17bc0
commit
12e61d33be
@ -61,7 +61,7 @@ int Layers_index(lua_State* L)
|
||||
auto obj = get_obj<LayersObj>(L, 1);
|
||||
|
||||
// Index by layer name
|
||||
if (lua_isstring(L, 2)) {
|
||||
if (lua_type(L, 2) == LUA_TSTRING) {
|
||||
if (const char* name = lua_tostring(L, 2)) {
|
||||
for (ObjectId layerId : obj->layers) {
|
||||
Layer* layer = doc::get<Layer>(layerId);
|
||||
|
Loading…
Reference in New Issue
Block a user