summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-24 23:08:19 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-24 23:08:19 +0200
commit509f8031b2b347c033327ef33f3e5573a0595dbc (patch)
tree13ebea0f24d3cca8cae3fca8c6728ef7eb831721
parent10476521f51d5902d191f2189307781fc48a3a16 (diff)
downloadvim-git-509f8031b2b347c033327ef33f3e5573a0595dbc.tar.gz
patch 8.2.1738: Mac: str2float() recognizes comma instead of decimal pointv8.2.1738
Problem: Mac: str2float() recognizes comma instead of decimal point. Solution: Set LC_NUMERIC to "C". (closes #7003)
-rw-r--r--src/os_mac_conv.c4
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/os_mac_conv.c b/src/os_mac_conv.c
index 3daf74a48..fd6212464 100644
--- a/src/os_mac_conv.c
+++ b/src/os_mac_conv.c
@@ -580,6 +580,10 @@ mac_lang_init(void)
# 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 24e30ff1d..0b3c5f559 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1738,
+/**/
1737,
/**/
1736,