Skip to content

Commit 3a60651

Browse files
committed
fix restoring of locale setting in interp
1 parent 634cfb6 commit 3a60651

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/emc/rs274ngc/interp_internal.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,9 +992,9 @@ macros totally crash-proof. If the function call stack is deeper than
992992

993993
struct scoped_locale {
994994
scoped_locale(int category_, const char *locale_) : category(category_), oldlocale(setlocale(category, NULL)) { setlocale(category, locale_); }
995-
~scoped_locale() { setlocale(category, oldlocale); }
995+
~scoped_locale() { setlocale(category, oldlocale.c_str()); }
996996
int category;
997-
const char *oldlocale;
997+
std::string oldlocale;
998998
};
999999

10001000
#define FORCE_LC_NUMERIC_C scoped_locale force_lc_numeric_c(LC_NUMERIC, "C")

0 commit comments

Comments
 (0)