Bug fix. Using comma instead of dot in Convert.ToSingle#158
Bug fix. Using comma instead of dot in Convert.ToSingle#158Lucasrsv1 wants to merge 1 commit intodwmkerr:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #158 +/- ##
=====================================
Coverage 0.5% 0.5%
=====================================
Files 91 91
Lines 3781 3781
=====================================
Hits 19 19
Misses 3762 3762Continue 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.