Allow require paths without replacements

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2015-01-14 15:17:16 +01:00
parent 13594e3e38
commit ca343e063e
+2 -3
View File
@@ -558,10 +558,9 @@ int loader(lua_State *L)
for (std::string element : inst->getRequirePath()) for (std::string element : inst->getRequirePath())
{ {
size_t pos = element.find('?'); size_t pos = element.find('?');
if (pos == std::string::npos) if (pos != std::string::npos)
continue; element.replace(pos, 1, modulename);
element.replace(pos, 1, modulename);
if (inst->isFile(element.c_str())) if (inst->isFile(element.c_str()))
{ {
lua_pop(L, 1); lua_pop(L, 1);