Decompile fn_18254 (LoadLuaResource)

Batch #15805 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_18254 LoadLuaResource: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, eAthena
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-10 12:04:00 +00:00
commit 621237468c

View file

@ -45,7 +45,11 @@ bool LoadLuaResource(lua_State* state, const std::string& name, unsigned char al
}
}
const bool loaded = luaL_loadbuffer(state, static_cast<const char*>(file.GetData()), file.GetSize(), resolved.c_str()) == 0;
if (luaL_loadbuffer(state, static_cast<const char*>(file.GetData()), file.GetSize(), resolved.c_str()) != 0) {
file.Close();
return false;
}
file.Close();
return loaded;
return true;
}