summaryrefslogtreecommitdiff
path: root/adjust.go
diff options
context:
space:
mode:
Diffstat (limited to 'adjust.go')
-rw-r--r--adjust.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/adjust.go b/adjust.go
index 28b62cc..ef7b19a 100644
--- a/adjust.go
+++ b/adjust.go
@@ -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])
}