Unrelated: Fix file-relative require searcher

This commit is contained in:
Mm2PL 2024-10-03 17:59:23 +02:00
parent f1c63091af
commit d147aae066
No known key found for this signature in database
GPG key ID: 94AC9B80EFA15ED9

View file

@ -284,7 +284,7 @@ int searcherAbsolute(lua_State *L)
int searcherRelative(lua_State *L) int searcherRelative(lua_State *L)
{ {
lua_Debug dbg; lua_Debug dbg;
lua_getstack(L, 1, &dbg); lua_getstack(L, 2, &dbg);
lua_getinfo(L, "S", &dbg); lua_getinfo(L, "S", &dbg);
auto currentFile = QString::fromUtf8(dbg.source, dbg.srclen); auto currentFile = QString::fromUtf8(dbg.source, dbg.srclen);
if (currentFile.startsWith("@")) if (currentFile.startsWith("@"))