-
Notifications
You must be signed in to change notification settings - Fork 9
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
while b < e : | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not just write the rest at this point? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.") | ||
|
There was a problem hiding this comment.
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.