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
}
}
}
diff --git a/src/version.c b/src/version.c
index 24e30ff..0b3c5f5 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1738,
+/**/
1737,
/**/
1736,