Empty hex files cause tobinarray to always return empty arrays
Bug #372620 reported by
sneakypete
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
IntelHex |
Fix Released
|
Medium
|
Alexander Belchenko |
Bug Description
1) Load an empty file: (eg. file containing just ":00000001FF")
ih = IntelHex(filename)
2) Call "tobinarray"
print ih.tobinarray(0, 2)
This returns array('B') but should return array('B', [255, 255, 255])
3) Add a single data element and try again:
ih[0] = 255
print ih.tobinarray(0, 2)
This correctly returns array('B', [255, 255, 255])
Related branches
Changed in intelhex: | |
assignee: | nobody → Alexander Belchenko (bialix) |
milestone: | none → 1.2 |
status: | Confirmed → Fix Committed |
Changed in intelhex: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Yes, this is the bug, because you explicitly specify the address range.
But in the case when address range is not specified or open-ended IntelHex still should return empty array.