mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 19:35:36 +02:00
[244012] Memory Rendering Transport export SRecord Exporter should zero pad the checksum
This commit is contained in:
parent
1a8fe00295
commit
83c2420761
1 changed files with 5 additions and 2 deletions
|
@ -441,7 +441,10 @@ public class SRecordExporter implements IMemoryExporter
|
||||||
checksum += value.byteValue();
|
checksum += value.byteValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
buf.append(BigInteger.valueOf(0xFF - checksum).and(BigInteger.valueOf(0xFF)).toString(16));
|
String bString = BigInteger.valueOf(0xFF - checksum).and(BigInteger.valueOf(0xFF)).toString(16);
|
||||||
|
if(bString.length() == 1)
|
||||||
|
buf.append("0");
|
||||||
|
buf.append(bString);
|
||||||
|
|
||||||
writer.write(buf.toString().toUpperCase());
|
writer.write(buf.toString().toUpperCase());
|
||||||
writer.write("\n");
|
writer.write("\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue