mirror of
https://github.com/love2d/love.git
synced 2026-08-12 16:40:57 +02:00
love.filesystem's loaders in the package.loaders table error instead of crashing when no argument is given to them (resolves issue #1504).
This commit is contained in:
@@ -720,7 +720,7 @@ static void replaceAll(std::string &str, const std::string &substr, const std::s
|
||||
|
||||
int loader(lua_State *L)
|
||||
{
|
||||
std::string modulename = luax_tostring(L, 1);
|
||||
std::string modulename = luax_checkstring(L, 1);
|
||||
|
||||
for (char &c : modulename)
|
||||
{
|
||||
@@ -761,7 +761,7 @@ static const char *library_extensions[] =
|
||||
|
||||
int extloader(lua_State *L)
|
||||
{
|
||||
const char *filename = lua_tostring(L, -1);
|
||||
std::string filename = luax_checkstring(L, 1);
|
||||
std::string tokenized_name(filename);
|
||||
std::string tokenized_function(filename);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user