Skip to content

Fix culture-sensitive Maths.mhd parsing#211

Open
valcryst wants to merge 1 commit into
LoadedCamel:masterfrom
valcryst:fix/maths-mhd-invariant-3.x
Open

Fix culture-sensitive Maths.mhd parsing#211
valcryst wants to merge 1 commit into
LoadedCamel:masterfrom
valcryst:fix/maths-mhd-invariant-3.x

Conversation

@valcryst

@valcryst valcryst commented Jul 16, 2026

Copy link
Copy Markdown

Maths.mhd uses a fixed dot decimal separator, but LoadMaths parsed its
floating-point fields using the current culture. On comma-decimal locales,
values such as 0.700 could be interpreted as 700, inflating enhancement and
ED percentages by a factor of 1,000.

Parse only the Maths.mhd numeric fields with NumberStyles.Float and
CultureInfo.InvariantCulture while preserving the existing load-error
behavior.

This issue was discovered while working on Mids Linux.
I was unable to test the upstream Windows application because I do not have access to a Windows system.

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.

1 participant