mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 13:48:06 +00:00
Fixed negative index bug
This commit is contained in:
parent
3c36db9285
commit
8f166a9848
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user