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

Configure: crash when id in patch.js is wrong #218

Open
brliron opened this issue May 12, 2023 · 2 comments
Open

Configure: crash when id in patch.js is wrong #218

brliron opened this issue May 12, 2023 · 2 comments

Comments

@brliron
Copy link
Member

brliron commented May 12, 2023

When the id in patch.js is wrong, thcrap_configure_v3 crashes at this line: https://github.com/thpatch/thcrap/blob/ffc4277150946c8a33695b44cd272855e47dd9b6/thcrap_configure_v3/MainWindow.xaml.cs#LL105C15-L105C15
knownPatches contains the patch names from the various repo.js files, and the id variable comes from patch_bootstrap and contains the id from patch.js. That id isn't in knownPatches, so the function knownPatches.First() throws an exception because it didn't find anything.

Something is wrong and we don't need to make things work in this case, but a readable error message would be better than a crash.

@32th-System
Copy link
Member

if the ID of a patch is already specified by it's folder name in the repo, why is it specified separately in patch.js?

@brliron
Copy link
Member Author

brliron commented May 14, 2023

That's a good question...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants