diff options
author | John Peacock <jpeacock@rowman.com> | 2006-09-17 12:58:58 -0400 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-09-18 08:35:21 +0000 |
commit | 63e3af20059610d29fa934e8330849fee9c115c5 (patch) | |
tree | 83b0e7c382b22f88c106fa3eded33d18286edc00 /universal.c | |
parent | 7f39519f31fe8f3aa4f113c542472c46ec6c535a (diff) | |
download | perl-63e3af20059610d29fa934e8330849fee9c115c5.tar.gz |
Re: [perl #37714] XSUB.h version check may fail due to locale
Message-ID: <450DB712.4040703@rowman.com>
p4raw-id: //depot/perl@28864
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/universal.c b/universal.c index 52395cce69..251fbacca6 100644 --- a/universal.c +++ b/universal.c @@ -691,10 +691,11 @@ XS(XS_version_qv) #ifdef USE_LOCALE_NUMERIC char *loc = setlocale(LC_NUMERIC, "C"); #endif - const STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVgf, SvNVX(ver)); + STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVgf, SvNVX(ver)); #ifdef USE_LOCALE_NUMERIC setlocale(LC_NUMERIC, loc); #endif + while (tbuf[len-1] == '0' && len > 0) len--; version = savepvn(tbuf, len); } else |