summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorJohn Peacock <jpeacock@rowman.com>2007-02-12 16:51:23 -0500
committerSteve Peters <steve@fisharerojo.org>2007-02-13 03:19:05 +0000
commit761d10436e390f85abe2316d8cf1f150f32b4bee (patch)
tree57f896e776300681b8ba5a5493c71f9353d44ac5 /util.c
parent71002916d0dd9cda17cdc7bf017aef99352c0b90 (diff)
downloadperl-761d10436e390f85abe2316d8cf1f150f32b4bee.tar.gz
Fwd: CPAN Upload: J/JP/JPEACOCK/version-0.70.tar.gz
Message-ID: <45D127AB.3050904@rowman.com> p4raw-id: //depot/perl@30254
Diffstat (limited to 'util.c')
-rw-r--r--util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util.c b/util.c
index a8b83f721d..d23dc8a8e3 100644
--- a/util.c
+++ b/util.c
@@ -4141,6 +4141,9 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv)
if ( alpha && !saw_period )
Perl_croak(aTHX_ "Invalid version format (alpha without decimal)");
+ if ( alpha && saw_period && width == 0 )
+ Perl_croak(aTHX_ "Invalid version format (misplaced _ in number)");
+
if ( saw_period > 1 )
qv = 1; /* force quoted version processing */