freemyipod r576 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r575‎ | r576 | r577 >
Date:15:42, 9 February 2011
Author:theseven
Status:new
Tags:
Comment:
emcore.py: hexdump: zero-pad the hex values
Modified paths:
  • /emcore/trunk/tools/emcore.py (modified) (history)

Diff [purge]

Index: emcore/trunk/tools/emcore.py
@@ -294,7 +294,7 @@
295295 w = 0
296296 for b in range(wordsize):
297297 w = (w << 8) | struct.unpack("B", data[i + b])[0]
298 - sys.stdout.write((" %%%dX" % (wordsize * 2)) % w)
 298+ sys.stdout.write((" %%0%dX" % (wordsize * 2)) % w)
299299 else: sys.stdout.write(" " * (wordsize * 2 + 1))
300300 if ascii:
301301 sys.stdout.write(" |")