diff options
author | Deepak S <in.live.in@live.in> | 2021-07-10 09:47:41 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-10 12:17:41 +0800 |
commit | ee8098037dc71028e755ae62dfeb823c0e7b366e (patch) | |
tree | 0c4732b583e1f1af57ccb3d9e79896c5e64ba621 /adjust.go | |
parent | 2ced00d6a82f993094858e60127d4f817ad788e3 (diff) |
Prevent panic when incorrect range is provided as PivotTableRange to (#874)
Diffstat (limited to 'adjust.go')
-rw-r--r-- | adjust.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -198,6 +198,10 @@ func (f *File) adjustAutoFilterHelper(dir adjustDirection, coordinates []int, nu // pair of coordinates. func (f *File) areaRefToCoordinates(ref string) ([]int, error) { rng := strings.Split(strings.Replace(ref, "$", "", -1), ":") + if len(rng) < 2 { + return nil, ErrParameterInvalid + } + return areaRangeToCoordinates(rng[0], rng[1]) } |