projects
/
lightning.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3cebea
)
Fix zeroing everything if max-variants not specified.
author
Tom Clegg <tom@tomclegg.ca>
Thu, 6 Feb 2020 20:40:13 +0000
(15:40 -0500)
committer
Tom Clegg <tom@tomclegg.ca>
Thu, 6 Feb 2020 20:40:13 +0000
(15:40 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>
filter.go
patch
|
blob
|
history
diff --git
a/filter.go
b/filter.go
index 679c319fbfad5d71c8e84fe81657275eed2e5324..239040dbaf453dd3f64290e91745eec8f6611101 100644
(file)
--- a/
filter.go
+++ b/
filter.go
@@
-56,8
+56,12
@@
func (cmd *filterer) RunCommand(prog string, args []string, stdin io.Reader, std
if ntags < len(cg.Variants)/2 {
ntags = len(cg.Variants) / 2
}
+ if *maxvariants < 0 {
+ continue
+ }
+ maxVariantID := tileVariantID(*maxVariants)
for idx, variant := range cg.Variants {
- if
int(variant) > *maxvariants
{
+ if
variant > maxVariantID
{
for _, cg := range cgs {
if len(cg.Variants) > idx {
cg.Variants[idx & ^1] = 0