Browse Source

Fix LUT offset bug

Nicola Corna 7 years ago
parent
commit
ab4e5839aa
1 changed files with 2 additions and 1 deletions
  1. 2 1
      me_cleaner.py

+ 2 - 1
me_cleaner.py

@@ -249,7 +249,8 @@ def relocate_partition(f, me_start, me_end, partition_header_offset,
         f.seek(llut_start)
         if f.read(4) == b"LLUT":
             print(" Adjusting LUT start offset...")
-            lut_offset = llut_start + offset_diff + 0x40 - lut_start_corr
+            lut_offset = llut_start + offset_diff + 0x40 - \
+                         lut_start_corr - me_start
             f.write_to(llut_start + 0x0c, pack("<I", lut_offset))
 
             print(" Adjusting Huffman start offset...")