freemyipod r900 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r899‎ | r900 | r901 >
Date:23:11, 28 January 2014
Author:user890104
Status:new
Tags:
Comment:
ipoddfu: finally fix libipoddfu.py to work in both python2 and python3, thanks to TheSeven
Modified paths:
  • /tools/ipoddfu/libipoddfu.py (modified) (history)

Diff [purge]

Index: tools/ipoddfu/libipoddfu.py
@@ -187,7 +187,7 @@
188188
189189 crc = 0xffffffff
190190 for i in range(len(data)):
191 - crc = (crc >> 8) ^ crc_table[(crc ^ data[i]) & 0xff];
 191+ crc = (crc >> 8) ^ crc_table[(crc ^ struct.unpack("B", data[i:i+1])[0]) & 0xff];
192192
193193 return crc
194194