mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Restore 0-argument love.graphics.newFont/love.font.newRasterizer
Fix subtle bug in luax_convobj in the process, it couldn't deal with 0 arguments before.
This commit is contained in:
@@ -489,7 +489,8 @@ int luax_convobj(lua_State *L, int idxs[], int n, const char *mod, const char *f
|
||||
lua_call(L, n, 2); // Call the function, n args, one return value (plus optional errstring.)
|
||||
luax_assert_nilerror(L, -2); // Make sure the function returned something.
|
||||
lua_pop(L, 1); // Pop the second return value now that we don't need it.
|
||||
lua_replace(L, idxs[0]); // Replace the initial argument with the new object.
|
||||
if (n > 0)
|
||||
lua_replace(L, idxs[0]); // Replace the initial argument with the new object.
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user