From 61ce2d416b9c08eca598279bcc6224850dbc9e25 Mon Sep 17 00:00:00 2001 From: CPunch Date: Thu, 11 Aug 2022 15:52:50 -0500 Subject: [PATCH] lundump.py: only list protos if we have any --- lundump.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lundump.py b/lundump.py index 52e00a2..79c094f 100644 --- a/lundump.py +++ b/lundump.py @@ -190,9 +190,10 @@ class Chunk: for i in range(len(self.instructions)): print("[%3d] %s" % (i, self.instructions[i].toString())) - print("\n==== [[" + str(self.name) + "'s protos]] ====\n") - for z in self.protos: - z.print() + if len(self.protos) > 0: + print("\n==== [[" + str(self.name) + "'s protos]] ====\n") + for z in self.protos: + z.print() instr_lookup_tbl = [ Instruction(InstructionType.ABC, "MOVE"), Instruction(InstructionType.ABx, "LOADK"), Instruction(InstructionType.ABC, "LOADBOOL"),