Skip to content

Commit e0d608e

Browse files
committed
locale.c: Use wrap_wsetlocale on Windows
This was the final remaining use of plain setlocale() on Windows. All others have been converted to wrap_wsetlocale, introduced in 6c33203. There is no issue with the input name in this instance, since it is NULL and not a character string, but it occurred to me that the locale name returned by the function could be problematic. _wsetlocale() should be safe in all cases.
1 parent 2a9ab84 commit e0d608e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

locale.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2665,7 +2665,7 @@ S_win32_setlocale(pTHX_ int category, const char* locale)
26652665
PL_cur_LC_ALL = savepv(result);
26662666
}
26672667
else {
2668-
PL_cur_LC_ALL = savepv(setlocale(LC_ALL, NULL));
2668+
PL_cur_LC_ALL = savepv(wrap_wsetlocale(LC_ALL, NULL));
26692669
}
26702670

26712671
# endif

0 commit comments

Comments
 (0)