In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/d1b150d9136b2bfacd23a52dfd12315b0896e8f7?hp=013f4e0383e9c5115a28838e882eb9cb8a7aeaed>
- Log ----------------------------------------------------------------- commit d1b150d9136b2bfacd23a52dfd12315b0896e8f7 Author: Karl Williamson <k...@cpan.org> Date: Sun Feb 25 12:51:59 2018 -0700 Fix Perl_langinfo() for non-nl_langinfo() systems Commit 628ff75a4a7ac013dad43df7a53fcb55bf758ed7 caused the return value to not be set for some paths through the function on platforms, like Windows, that don't have nl_langinfo() ----------------------------------------------------------------------- Summary of changes: locale.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/locale.c b/locale.c index 809b6b9499..4d3b2487bd 100644 --- a/locale.c +++ b/locale.c @@ -2850,13 +2850,14 @@ S_my_nl_langinfo(const int item, bool toggle) LOCALE_UNLOCK; + retval = PL_langinfo_buf; + /* If to return the format, not the value, overwrite the buffer * with it. But some strftime()s will keep the original format * if illegal, so change those to "" */ if (return_format) { if (strEQ(PL_langinfo_buf, format)) { *PL_langinfo_buf = '\0'; - retval = PL_langinfo_buf; } else { retval = save_to_buffer(format, &PL_langinfo_buf, -- Perl5 Master Repository