# HG changeset patch # User Bram Moolenaar # Date 1600982104 -7200 # Node ID e1e24b1dba6e4152f1487c0ac47678cc80172620 # Parent 61c93dd752ad2c00b6bd09a1b47fe62d156b780c patch 8.2.1738: Mac: str2float() recognizes comma instead of decimal point Commit: https://github.com/vim/vim/commit/509f8031b2b347c033327ef33f3e5573a0595dbc Author: Bram Moolenaar Date: Thu Sep 24 23:08:19 2020 +0200 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 https://github.com/vim/vim/issues/7003) diff --git a/src/os_mac_conv.c b/src/os_mac_conv.c --- 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 --- 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,