Bug fix. Using comma instead of dot in Convert.ToSingle#158
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #158 +/- ##
=====================================
Coverage 0.50% 0.50%
=====================================
Files 91 91
Lines 3781 3781
=====================================
Hits 19 19
Misses 3762 3762 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
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.