Skip to content

Commit 8ae65da

Browse files
committed
Fix bug in format auto spec indexing.
1 parent e90e2bf commit 8ae65da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vm/src/format.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ impl FormatString {
856856
auto_argument_index += 1;
857857
arguments
858858
.args
859-
.get(auto_argument_index)
859+
.get(auto_argument_index - 1)
860860
.cloned()
861861
.ok_or_else(|| vm.new_index_error("tuple index out of range".to_owned()))
862862
}

0 commit comments

Comments
 (0)