From 83c242076128f145b7387ea496ef8e7e60c9158d Mon Sep 17 00:00:00 2001 From: Ted Williams Date: Sun, 24 Aug 2008 03:22:57 +0000 Subject: [PATCH] [244012] Memory Rendering Transport export SRecord Exporter should zero pad the checksum --- .../dd/debug/ui/memory/transport/SRecordExporter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/org.eclipse.dd.debug.ui.memory.transport/src/org/eclipse/dd/debug/ui/memory/transport/SRecordExporter.java b/plugins/org.eclipse.dd.debug.ui.memory.transport/src/org/eclipse/dd/debug/ui/memory/transport/SRecordExporter.java index ba1c44cc3d5..b6807db518f 100644 --- a/plugins/org.eclipse.dd.debug.ui.memory.transport/src/org/eclipse/dd/debug/ui/memory/transport/SRecordExporter.java +++ b/plugins/org.eclipse.dd.debug.ui.memory.transport/src/org/eclipse/dd/debug/ui/memory/transport/SRecordExporter.java @@ -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");