bump(github.com/evanphx/json-patch): 94e38aa1586e8a6c8a75770bddf5ff84c48a106b

This commit is contained in:
Jordan Liggitt
2018-05-25 22:29:07 -04:00
parent 8306b0b1a4
commit 2d28e0d6a3
9 changed files with 371 additions and 36 deletions

View File

@@ -397,7 +397,9 @@ func (d *partialArray) add(key string, val *lazyNode) error {
}
idx = len(ary) - idx
}
if idx < 0 || idx >= len(ary) || idx > len(cur) {
return fmt.Errorf("Unable to access invalid index: %d", idx)
}
copy(ary[0:idx], cur[0:idx])
ary[idx] = val
copy(ary[idx+1:], cur[idx:])