Skip to content

Commit

Permalink
Fix an extra space in single stmt elses (angr#4049)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahaloz authored Jul 29, 2023
1 parent a7ab3ea commit 40783d5
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions angr/analyses/decompiler/structured_codegen/c.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,17 +937,12 @@ def c_repr_chunks(self, indent=0, asexpr=False):
yield from self.else_node.c_repr_chunks(indent=indent)
else:
if single_stmt_else:
if self.codegen.braces_on_own_lines:
yield indent_str, None
else:
yield " ", None
yield indent_str, None
yield indent_str, None
elif self.codegen.braces_on_own_lines:
yield "\n", None
yield indent_str, None
else:
if self.codegen.braces_on_own_lines:
yield "\n", None
yield indent_str, None
else:
yield " ", None
yield " ", None

yield "else", self
if self.codegen.braces_on_own_lines or single_stmt_else:
Expand Down

0 comments on commit 40783d5

Please sign in to comment.