Skip to content

Commit fa33c40

Browse files
Fix: make sure clinit has at least one register
Kirlif/d2c@8030548 Co-authored-by: Kirlif <[email protected]>
1 parent c0bf20c commit fa33c40

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dcc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,9 @@ def dcc_main(
10551055
None,
10561056
)
10571057
if locals_index is not None:
1058+
loc = re.compile("( (?:\\.locals|\\.registers) )(\\d+)\n").search(content[index + locals_index])
1059+
if loc.group(2) == "0":
1060+
content[index + locals_index] = loc.group(1) + "1" + "\n"
10581061
content.insert(index + locals_index + 1, line_to_insert)
10591062
else:
10601063
Logger.error("Couldn't read <clinit> method in Application class")

0 commit comments

Comments
 (0)