You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2019/11/08 01:40:55 UTC

[mynewt-artifact] branch master updated: Fix FindProtTlv functions: were returning reg TLVs

This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-artifact.git


The following commit(s) were added to refs/heads/master by this push:
     new f511d8f  Fix FindProtTlv functions: were returning reg TLVs
f511d8f is described below

commit f511d8f23378139994073805f061f9d0ef80d886
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Thu Nov 7 17:36:31 2019 -0800

    Fix FindProtTlv functions: were returning reg TLVs
    
    The Image#FindProtTlv functions were returning TLVs from the regular
    list, not the protected list!
---
 image/image.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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 @@ func (img *Image) FindProtTlvsIf(pred func(tlv ImageTlv) bool) []*ImageTlv {
 
 	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 @@ func (img *Image) FindProtTlvs(tlvType uint8) []*ImageTlv {
 
 	idxs := img.FindProtTlvIndices(tlvType)
 	for _, idx := range idxs {
-		tlvs = append(tlvs, &img.Tlvs[idx])
+		tlvs = append(tlvs, &img.ProtTlvs[idx])
 	}
 
 	return tlvs