1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

autofree: fix an off by 1 error

This commit is contained in:
Alexander Medvednikov 2020-12-02 03:45:08 +01:00
parent 8adc8ed103
commit 953a51bec8

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)
}
}
}