mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-28 00:39:30 +00:00
Fixed #1
"gfx.texture.load()" with a bad file name now return "nil" and an error.
This commit is contained in:
parent
ff6aa8e497
commit
f580341aff
1 changed files with 6 additions and 0 deletions
|
|
@ -40,6 +40,12 @@ static int texture_load(lua_State *L) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (texture->texture == NULL) {
|
||||||
|
lua_pushnil(L);
|
||||||
|
lua_pushstring(L, "No such file");
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
texture->scaleX = 1.0f;
|
texture->scaleX = 1.0f;
|
||||||
texture->scaleY = 1.0f;
|
texture->scaleY = 1.0f;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue