summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-05-22 15:02:08 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-05-22 15:02:08 +0000
commitc8a14fb6c15fa7e7d9f1ce7bc6160eab4bca36af (patch)
tree7aa6c43184e0e65e5483b1f8f6cda8cbbc2d71e3 /util.c
parent188f0c84c39131341bfb7749b35facb3de682e0f (diff)
downloadperl-c8a14fb6c15fa7e7d9f1ce7bc6160eab4bca36af.tar.gz
Upgrade to version.pm 0.60
p4raw-id: //depot/perl@28276
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util.c b/util.c
index 4abdf73100..407d86f441 100644
--- a/util.c
+++ b/util.c
@@ -4148,7 +4148,7 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv)
/* Append revision */
av_push(av, newSViv(rev));
- if ( *pos == '.' && isDIGIT(pos[1]) )
+ if ( *pos == '.' )
s = ++pos;
else if ( *pos == '_' && isDIGIT(pos[1]) )
s = ++pos;
@@ -4294,7 +4294,8 @@ Perl_upg_version(pTHX_ SV *ver)
if ( SvNOK(ver) ) /* may get too much accuracy */
{
char tbuf[64];
- const STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVgf, SvNVX(ver));
+ STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVff, SvNVX(ver));
+ while (tbuf[len-1] == '0' && len > 0) len--;
version = savepvn(tbuf, len);
}
#ifdef SvVOK