fixed single s-record segment detection
This commit is contained in:
parent
5fe59b8a40
commit
751ed05720
1 changed files with 3 additions and 0 deletions
|
@ -151,6 +151,9 @@ func (*S19Reader) DetectAddressRanges(records []*SRecord) []AddressRange {
|
||||||
currentRange.SliceEnd = uint32(sliceIndex)
|
currentRange.SliceEnd = uint32(sliceIndex)
|
||||||
} else {
|
} else {
|
||||||
// Save the current range and start a new one
|
// Save the current range and start a new one
|
||||||
|
if currentRange.SliceEnd == 0 {
|
||||||
|
currentRange.SliceEnd = currentRange.SliceStart
|
||||||
|
}
|
||||||
ranges = append(ranges, *currentRange)
|
ranges = append(ranges, *currentRange)
|
||||||
currentRange = &AddressRange{
|
currentRange = &AddressRange{
|
||||||
SliceStart: uint32(sliceIndex),
|
SliceStart: uint32(sliceIndex),
|
||||||
|
|
Loading…
Add table
Reference in a new issue