Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes memory overflow with ldd4.3 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion LIFExtractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,14 @@ def recurse(prefix, offset):

#Loop through the list of files, saving them.
for a in fileList:
print("- extracting : "+outFolder+a[0])
f = open((outFolder + a[0]), "wb")
f.write(fileData[a[1]:a[1]+a[2]])
b = a[1]; e = a[1]+a[2] ; step = 0x1000000

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to avoid setting multiple variables on one line.

while b < e :

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep the formatting consistent, maybe avoid spaces before the :.

while (b+step) > e :
step /= 2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just write the rest at this point?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to fit the size of Lego bricks indeed ;)

f.write(fileData[b:b+step])
b += step
f.close()

print("\tCOMPLETE: " + str(len(fileList)) + " files in " + str(len(folderList)) + " folders extracted.")
Expand Down