From 3ea89f1674626f75b73b98f9931770c27e4636a0 Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 12 Apr 2021 11:25:31 +1200 Subject: [PATCH] scrcaps: fix bad check for unsupported scrcap presence --- scrape.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrape.go b/scrape.go index 6bcfb1a..9aaf1f2 100644 --- a/scrape.go +++ b/scrape.go @@ -103,7 +103,7 @@ func (ltc *loadTupContent) Validate() error { return fmt.Errorf("scrsecs/scrcaps length mismatch") } - if !(len(ltc.Scrcaps) == 0 || ltc.Scrcaps[0] == "") { + if !(len(ltc.Scrcaps) == 0 || (len(ltc.Scrcaps) == 1 && ltc.Scrcaps[0] == "")) { return errors.New("unsupported use of strcaps") }