-
-
Notifications
You must be signed in to change notification settings - Fork 124
Replace game's CRT function call in floating point number INI parser #1973
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
bee4d9a to
c38fce0
Compare
Contributor
|
since we can neither reproduce the desync nor have a reliable way to test its correctness, it seems that we can only rely on more reviews on this one |
Contributor
|
See this issue: |
Metadorius
reviewed
Dec 9, 2025
598db6f to
b9f4493
Compare
Starkku
added a commit
that referenced
this pull request
Dec 10, 2025
…1973) Attempts to address one of the issues presented in #1970 by working around the changes introduced in 9c8bd9e by replacing calling game's CRT functions. `sscanf(_s)` produces results with different precision from game's `sscanf`. Using `strtod` and casting the result double into float appears to be more accurate but whether or not these results are consistent across different systems I do not know. This merely addresses the floating point number parsing in Phobos (which also replaces game's floating point number INI parser, see hook `INIClass_ReadDouble_Overwrite` in `Misc\Hooks.INIInheritance.cpp`) and does not in any way involve any potential root causes for why calling game's CRT functions is problematic in the first place. --------- Co-authored-by: Kerbiter <crabiter@vivaldi.net>
DeathFishAtEase
added a commit
to DeathFishAtEase/Phobos
that referenced
this pull request
Dec 11, 2025
DeathFishAtEase
added a commit
to DeathFishAtEase/Phobos
that referenced
this pull request
Dec 11, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
❓Crash / Desync
Interaction
Something related to interaction with other extension, program etc.
No Documentation Needed
No documentation needed whatsoever
❓Phobos bug
Something isn't working properly
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attempts to address one of the issues presented in #1970 by working around the changes introduced in 9c8bd9e by replacing calling game's CRT functions.
sscanf(_s)produces results with different precision from game'ssscanf. Usingstrtodand casting the result double into float appears to be more accurate but whether or not these results are consistent across different systems I do not know.This merely addresses the floating point number parsing in Phobos (which also replaces game's floating point number INI parser, see hook
INIClass_ReadDouble_OverwriteinMisc\Hooks.INIInheritance.cpp) and does not in any way involve any potential root causes for why calling game's CRT functions is problematic in the first place.