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

Fix version file buffers not staying alive during o2r unload close #26

Merged

Conversation

Archez
Copy link

@Archez Archez commented May 20, 2024

o2r archives using libzip requires that all buffers used with AddFile are maintained alive until the archive is unloaded. Otherwise the unload will write garbage data for those files.

the version and portVersion memory streams were returning temporary vector pointers or something, and the o2r was unloaded outside of the if block where the version stream is, so it was being destructed after the stream.

This addresses o2r archives showing as "unknown" game versions on the boot info.

@louist103 louist103 merged commit c2a891b into louist103:mmcs-rebase May 20, 2024
@Archez Archez deleted the fix-o2r-version-file-streams branch May 20, 2024 15:00
inspectredc pushed a commit to inspectredc/OTRExporter that referenced this pull request Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants