From a6623c8953f0bde00ced8a6e9b7926bad7ab4ccb Mon Sep 17 00:00:00 2001 From: CPunch Date: Fri, 12 Aug 2022 00:04:11 -0500 Subject: [PATCH] lparser.py: if local name is invalid, resort to fallback --- lparser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lparser.py b/lparser.py index 418047d..92dc3c4 100644 --- a/lparser.py +++ b/lparser.py @@ -89,7 +89,10 @@ class LuaDecomp: def __loadLocals(self): for i in range(len(self.chunk.locals)): - self.locals[i] = self.chunk.locals[i].name + if not self.chunk.locals[i].name == "": + self.locals[i] = self.chunk.locals[i].name + else: + self.__makeLocalIdentifier(i) def __addExpr(self, code: str) -> None: self.src += code