-
-
Notifications
You must be signed in to change notification settings - Fork 301
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
Bug fix. Using comma instead of dot in Convert.ToSingle #158
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #158 +/- ##
=====================================
Coverage 0.5% 0.5%
=====================================
Files 91 91
Lines 3781 3781
=====================================
Hits 19 19
Misses 3762 3762 Continue to review full report at Codecov.
|
Thanks @Lucasrsv1 - do you know why this occurs? Is it localisation related? Just want to make sure I don't cause issues for other locales |
Hi. Yes, it's related to location. It looks like the function Convert.ToSingle takes into consideration System.Globalization.CultureInfo.CurrentCulture in order to parse the value it receives. |
Ahah I see - in that case as the |
@dwmkerr I would advise you don't merge this PR. I think it will not work anymore for any culture such as English that use . and not , as the decimal separator. I too (on French machine) experienced issues when loading .obj files which I fixed differently (and arguably in a more portable way). What should be done is: everywhere you use I'll try to find some time, and submit here another PR... |
Agreed @odalet - if you could submit a PR that'd be awesome cause I am flat out!! |
I'll try to provide you with something this week-end! |
Here you go: PR #173 for you to review! |
I found this error while trying to load a .obj file.