patch 8.2.1738: Mac: str2float() recognizes comma instead of decimal point
Problem: Mac: str2float() recognizes comma instead of decimal point.
Solution: Set LC_NUMERIC to "C". (closes #7003)
diff --git a/src/os_mac_conv.c b/src/os_mac_conv.c
index 3daf74a..fd62124 100644
--- a/src/os_mac_conv.c
+++ b/src/os_mac_conv.c
@@ -580,6 +580,10 @@
# ifdef HAVE_LOCALE_H
setlocale(LC_ALL, "");
# endif
+# if defined(FEAT_FLOAT) && defined(LC_NUMERIC)
+ // Make sure strtod() uses a decimal point, not a comma.
+ setlocale(LC_NUMERIC, "C");
+# endif
}
}
}