autofree: fix an off by 1 error

pull/7080/head
Alexander Medvednikov 2020-12-02 03:45:08 +01:00
parent 8adc8ed103
commit 953a51bec8
1 changed files with 1 additions and 1 deletions

View File

@ -800,7 +800,7 @@ fn (mut g Gen) stmts_with_tmp_var(stmts []ast.Stmt, tmp_var string) {
return
}
}
g.autofree_scope_vars(stmt_pos.pos, stmt_pos.line_nr, false)
g.autofree_scope_vars(stmt_pos.pos - 1, stmt_pos.line_nr, false)
}
}
}