Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_fcb_offset doesn't consider 4 as valid #4

Open
billr1 opened this issue Jan 8, 2020 · 0 comments
Open

find_fcb_offset doesn't consider 4 as valid #4

billr1 opened this issue Jan 8, 2020 · 0 comments

Comments

@billr1
Copy link

billr1 commented Jan 8, 2020

The default offset is often 4, but thatg is rejected as invalid. Suggested patch below.
diff --git a/imxtools/init.py b/imxtools/init.py
index 72330d5..eb1f711 100644
--- a/imxtools/init.py
+++ b/imxtools/init.py
@@ -198,7 +198,7 @@ def find_fcb_offset(content):
"""
try:
index = content.index(b'FCB ')

  •    if (index > 4):
    
  •    if (index >= 4):
           return (index-4)
       return -1
    
    except ValueError as exc:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant