This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
use SvCUR(PL_numeric_radix_sv) not SvLEN()
authorDavid Mitchell <davem@iabyn.com>
Mon, 15 May 2017 10:59:49 +0000 (11:59 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 7 Jun 2017 08:11:01 +0000 (09:11 +0100)
commit4c039fd82ca62691f50df7ca9c2b86a84c445d16
treec3e1f9e038e2788ae76e7559273dbf85255f74dc
parent67d0ee8ee8593f11ed43f3ace64963f5645b73cc
use SvCUR(PL_numeric_radix_sv) not SvLEN()

When determining the length of buffer needed to output the decimal point
in the current locale, use SvCUR(PL_numeric_radix_sv) rather than
SvLEN(PL_numeric_radix_sv). I presume this was a thinko in the original
commit. Using SvLEN currently seems harmless, since typically SvCUR <
SvLEN, but one could conceive a future scenario where locale info is set
using alien string buffers with SvLEN(sv) == 0.
sv.c