freemyipod r555 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r554‎ | r555 | r556 >
Date:13:19, 7 February 2011
Author:theseven
Status:new
Tags:
Comment:
libemcorebootcfg: Fix an address generation bug
Modified paths:
  • /emcore/trunk/tools/libemcorebootcfg.py (modified) (history)

Diff [purge]

Index: emcore/trunk/tools/libemcorebootcfg.py
@@ -29,11 +29,11 @@
3030 data1 = encode(addr, option[2])
3131 if len(data1) == 0: addr1 = 0
3232 else: addr1 = addr
33 - addr = addr + addr1
 33+ addr = addr + len(data1)
3434 data2 = encode(addr, option[3])
3535 if len(data2) == 0: addr2 = 0
3636 else: addr2 = addr
37 - addr = addr + addr2
 37+ addr = addr + len(data2)
3838 if type(option[1]).__name__ == "str":
3939 data = option[1] + '\0'
4040 data = data.ljust((len(data) + 3) & ~3, '\0')