Skip to content

Commit

Permalink
dfuse-pack.py: Fix alternate settings if first is 0
Browse files Browse the repository at this point in the history
If binary files for different alternating settings were provided,
and the first was 0, the wrong setting would be encoded.

Signed-off-by: Tormod Volden <[email protected]>
  • Loading branch information
tormodvolden committed Feb 10, 2021
1 parent 4dfa0f2 commit c3aae39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dfuse-pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def build(file,targets,name=DEFAULT_NAME,device=DEFAULT_DEVICE):
print("Unreadable file '%s'." % binfile)
sys.exit(1)
checkbin(binfile)
if old_ealt and ealt != old_ealt:
if old_ealt is not None and ealt != old_ealt:
targets.append(target)
target = []
target.append({ 'address': address, 'alt': ealt, 'data': open(binfile,'rb').read() })
Expand Down

0 comments on commit c3aae39

Please sign in to comment.