1
0
Fork 0
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:
Ted Williams 2008-08-24 03:22:57 +00:00
parent 1a8fe00295
commit 83c2420761

View file

@ -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");