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 FF7 remake crash when no mods are selected #165

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

arifogel
Copy link
Contributor

@arifogel arifogel commented Oct 8, 2024

In function _active_mod_mappings, pak_priority_digits was calculated based on log base 10 of number of mod paths for selected mods. When no mods are selected (or no paths present in selected mods), this takes log(0) resulting in a ValueError. But pak_priority_digits is not needed in this case, so this commit fixes by early exiting in case of no mod paths prior to computing pak_priority_digits.

Example crash:
image

In function `_active_mod_mappings`, `pak_priority_digits` was calculated based on log base 10 of number of mod paths for selected mods. When no mods are selected (or no paths present in selected mods), this takes log(0) resulting in a ValueError. But no `pak_priority_digits` is needed in this case, so this commit fixes by early exiting in case of no mod paths prior to computing `pak_priority_digits`.
@Holt59 Holt59 merged commit 19599a8 into ModOrganizer2:master Oct 10, 2024
1 check passed
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