mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-04 08:46:09 +00:00
[lua] Fix crash calling io.open() without argument (fix #4159)
This commit is contained in:
parent
1a3c32a93d
commit
cc0f8d0dc4
@ -73,7 +73,7 @@ int secure_io_open(lua_State* L)
|
||||
{
|
||||
int n = lua_gettop(L);
|
||||
|
||||
std::string absFilename = base::get_absolute_path(lua_tostring(L, 1));
|
||||
std::string absFilename = base::get_absolute_path(luaL_checkstring(L, 1));
|
||||
|
||||
FileAccessMode mode = FileAccessMode::Read; // Read is the default access
|
||||
if (lua_tostring(L, 2) &&
|
||||
|
Loading…
Reference in New Issue
Block a user