mirror of
https://github.com/love2d/love.git
synced 2026-08-12 16:40:57 +02:00
Improved the error message when nil is passed as the first argument to love.image.newImageData (resolves issue #1205).
This commit is contained in:
@@ -218,6 +218,11 @@ FileData *luax_getfiledata(lua_State *L, int idx)
|
||||
return data;
|
||||
}
|
||||
|
||||
bool luax_cangetfiledata(lua_State *L, int idx)
|
||||
{
|
||||
return lua_isstring(L, idx) || luax_istype(L, idx, FILESYSTEM_FILE_ID) || luax_istype(L, idx, FILESYSTEM_FILE_DATA_ID);
|
||||
}
|
||||
|
||||
int w_newFileData(lua_State *L)
|
||||
{
|
||||
// Single argument: treat as filepath or File.
|
||||
|
||||
Reference in New Issue
Block a user