diff --git a/vlib/v/gen/c/fn.v b/vlib/v/gen/c/fn.v index c6645ba4eb..18ab03183a 100644 --- a/vlib/v/gen/c/fn.v +++ b/vlib/v/gen/c/fn.v @@ -379,6 +379,11 @@ fn (mut g Gen) gen_fn_decl(node &ast.FnDecl, skip bool) { } prev_inside_ternary := g.inside_ternary g.inside_ternary = 0 + prev_indent := g.indent + g.indent = 0 + defer { + g.indent = prev_indent + } g.stmts(node.stmts) g.inside_ternary = prev_inside_ternary if node.is_noreturn {