Fix FindProtTlv functions: were returning reg TLVs
The Image#FindProtTlv functions were returning TLVs from the regular
list, not the protected list!
diff --git a/image/image.go b/image/image.go
index f0a033e..97bb080 100644
--- a/image/image.go
+++ b/image/image.go
@@ -345,7 +345,7 @@
idxs := img.FindProtTlvIndicesIf(pred)
for _, idx := range idxs {
- tlvs = append(tlvs, &img.Tlvs[idx])
+ tlvs = append(tlvs, &img.ProtTlvs[idx])
}
return tlvs
@@ -357,7 +357,7 @@
idxs := img.FindProtTlvIndices(tlvType)
for _, idx := range idxs {
- tlvs = append(tlvs, &img.Tlvs[idx])
+ tlvs = append(tlvs, &img.ProtTlvs[idx])
}
return tlvs