From: Rafael Garcia-Suarez Date: Thu, 14 Sep 2006 15:31:22 +0000 (+0000) Subject: Fix for bug #37714: XSUB.h version check may fail due to locale X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e24f8a798207476769992a3387804af506c43eab;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/util.c b/util.c index 88e7812..da53fa4 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); }