1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-27 16:39:29 +00:00
"gfx.texture.load()" with a bad file name now return "nil" and an error.
This commit is contained in:
Firew0lf 2015-08-21 21:18:41 +02:00
parent ff6aa8e497
commit f580341aff

View file

@ -40,6 +40,12 @@ static int texture_load(lua_State *L) {
return 2;
}
if (texture->texture == NULL) {
lua_pushnil(L);
lua_pushstring(L, "No such file");
return 2;
}
texture->scaleX = 1.0f;
texture->scaleY = 1.0f;