File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -71,16 +71,15 @@ def main() -> None:
7171 section_offset_table .byteswap ()
7272 section_size_table .byteswap ()
7373
74- last_end = array ("I" , [0 ] * section_count )
74+ last_offset = array ("I" , [0 ] * section_count )
7575 for i in range (unit_count ):
7676 for j in range (section_count ):
77- size = section_size_table [i * section_count + j ]
78- if size == 0 :
77+ if section_size_table [i * section_count + j ] == 0 :
7978 continue
8079 offset = section_offset_table [i * section_count + j ]
81- if offset < last_end [j ]:
82- sys .exit (f"Unit { i + 1 } section { j } not sorted" )
83- last_end [j ] = offset + size
80+ if offset < last_offset [j ]:
81+ sys .exit (f"{ section_name } unit { i + 1 } section { j } not sorted ( { hex ( offset ) } < { hex ( last_offset [ j ]) } ) " )
82+ last_offset [j ] = offset
8483
8584 print ("Sorted" )
8685
You can’t perform that action at this time.
0 commit comments