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 56b9e16  FindWithinFlashAreaDevOff: Fix bad compare
56b9e16 is described below

commit 56b9e1661ceb3dd059b145cc47b4302c2456ee68
Author: Christopher Collins <ccoll...@apache.org>
AuthorDate: Wed Mar 4 17:59:41 2020 -0800

    FindWithinFlashAreaDevOff: Fix bad compare
    
    This function was broken due to a typo in a comparison.
---
 manifest/mfg_manifest.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/manifest/mfg_manifest.go b/manifest/mfg_manifest.go
index 4ac6b74..95fd7d7 100644
--- a/manifest/mfg_manifest.go
+++ b/manifest/mfg_manifest.go
@@ -155,7 +155,7 @@ func (m *MfgManifest) FindWithinFlashAreaDevOff(device int, 
offset int) *flash.F
                fa := &m.FlashAreas[i]
                if fa.Device == device {
                        end := fa.Offset + fa.Size
-                       if offset >= offset && offset < end {
+                       if offset >= fa.Offset && offset < end {
                                return fa
                        }
                }

Reply via email to