mirror of
https://github.com/taigrr/yq
synced 2025-01-18 04:53:17 -08: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))
|
var contentLength = int64(len(value.Content))
|
||||||
for contentLength <= index {
|
for contentLength <= index {
|
||||||
value.Content = append(value.Content, &yaml.Node{Kind: guessKind(head, tail, 0)})
|
value.Content = append(value.Content, &yaml.Node{Kind: guessKind(head, tail, 0)})
|
||||||
|
contentLength = int64(len(value.Content))
|
||||||
}
|
}
|
||||||
var indexToUse = index
|
var indexToUse = index
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user