From: Nicholas Clark Date: Sun, 27 Oct 2002 18:39:03 +0000 (+0000) Subject: Re: Not OK: perl v5.9.0 +DEVEL17881 on i386-freebsd 4.6-release (UNINSTALLED) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e568f1a0c324be00c66a63ff9480ccd16934f37e;p=p5sagit%2Fp5-mst-13.2.git Re: Not OK: perl v5.9.0 +DEVEL17881 on i386-freebsd 4.6-release (UNINSTALLED) Message-ID: <20021027183902.GJ292@Bagpuss.unfortu.net> p4raw-id: //depot/perl@18070 --- diff --git a/util.c b/util.c index dde2994..c4b25af 100644 --- a/util.c +++ b/util.c @@ -3704,6 +3704,7 @@ is a beta version). char * Perl_scan_version(pTHX_ char *s, SV *rv) { + const char *start = s; char *pos = s; I32 saw_period = 0; bool saw_under = 0; @@ -3743,7 +3744,7 @@ Perl_scan_version(pTHX_ char *s, SV *rv) /* this is atoi() that delimits on underscores */ char *end = pos; I32 mult = 1; - if ( s < pos && *(s-1) == '_' ) { + if ( s < pos && s > start && *(s-1) == '_' ) { if ( *s == '0' && *(s+1) != '0') mult = 10; /* perl-style */ else