Skip to content

Commit

Permalink
[Normal] Update Some Codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdWindScholar committed Mar 24, 2024
1 parent bd957e7 commit f0ebb1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lpunpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,19 +647,19 @@ def unsparse(self):
if chunk_header.chunk_type == 0xCAC2:
data = self._read_data(chunk_data_size)
len_data = sector_size << 9
out.write(struct.pack("B", 0) * len_data)
out.truncate(out.tell()+len_data)
output_len += len(data)
sector_base += sector_size
else:
if chunk_header.chunk_type == 0xCAC3:
data = self._read_data(chunk_data_size)
len_data = sector_size << 9
out.write(struct.pack("B", 0) * len_data)
out.truncate(out.tell()+len_data)
output_len += len(data)
sector_base += sector_size
else:
len_data = sector_size << 9
out.write(struct.pack("B", 0) * len_data)
out.truncate(out.tell()+len_data)
sector_base += sector_size
chunks -= 1
return unsparse_file
Expand Down

0 comments on commit f0ebb1f

Please sign in to comment.