summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-09-14 15:31:22 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-09-14 15:31:22 +0000
commite24f8a798207476769992a3387804af506c43eab (patch)
tree5724c83a240740cdc7dda1a217def1f151155d56 /util.c
parentf49b0b20ddb87c0688a1b763a535acedb2558e2a (diff)
downloadperl-e24f8a798207476769992a3387804af506c43eab.tar.gz
Fix for bug #37714: XSUB.h version check may fail due to locale
Always convert version to number under C locale settings p4raw-id: //depot/perl@28847
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/util.c b/util.c
index 88e78126a5..da53fa4850 100644
--- a/util.c
+++ b/util.c
@@ -4319,7 +4319,9 @@ Perl_upg_version(pTHX_ SV *ver)
if ( SvNOK(ver) ) /* may get too much accuracy */
{
char tbuf[64];
+ SET_NUMERIC_STANDARD();
STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVff, SvNVX(ver));
+ SET_NUMERIC_LOCAL();
while (tbuf[len-1] == '0' && len > 0) len--;
version = savepvn(tbuf, len);
}