Fixed negative index bug

This commit is contained in:
Mike Farah 2020-04-14 11:17:29 +10:00
parent 3c36db9285
commit 8f166a9848
1 changed files with 1 additions and 0 deletions

View File

@ -263,6 +263,7 @@ func (n *navigator) recurseArray(value *yaml.Node, index int64, head interface{}
var contentLength = int64(len(value.Content))
for contentLength <= index {
value.Content = append(value.Content, &yaml.Node{Kind: guessKind(head, tail, 0)})
contentLength = int64(len(value.Content))
}
var indexToUse = index