mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +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,8 +441,11 @@ public class SRecordExporter implements IMemoryExporter
|
|||
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("\n");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue