diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-05-22 15:02:08 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-05-22 15:02:08 +0000 |
commit | c8a14fb6c15fa7e7d9f1ce7bc6160eab4bca36af (patch) | |
tree | 7aa6c43184e0e65e5483b1f8f6cda8cbbc2d71e3 /util.c | |
parent | 188f0c84c39131341bfb7749b35facb3de682e0f (diff) | |
download | perl-c8a14fb6c15fa7e7d9f1ce7bc6160eab4bca36af.tar.gz |
Upgrade to version.pm 0.60
p4raw-id: //depot/perl@28276
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |