summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-10 19:17:09 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-10 19:17:09 +0000
commit9f3d182ed95630da223ec0d99832141e262ccc05 (patch)
tree8eed5188dbc01789099214dd0ebd33f5714377ce /toke.c
parent1acb48c9d1d40d4a21897ac28a864cf7255b8a1c (diff)
downloadperl-9f3d182ed95630da223ec0d99832141e262ccc05.tar.gz
longstanding bug in parsing "require VERSION", could reallocate
current line and not know it; exposed by change#5004; manifested as parse failure of C<{require 5.003}> p4raw-link: @5004 on //depot/perl: 18b095192e336ba31465f4d3dab1ecc90871c3a9 p4raw-id: //depot/perl@5061
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 34599bd95f..44b3023f10 100644
--- a/toke.c
+++ b/toke.c
@@ -825,7 +825,7 @@ S_force_version(pTHX_ char *s)
if (*d == 'v')
d++;
for (; isDIGIT(*d) || *d == '_' || *d == '.'; d++);
- if ((*d == ';' || isSPACE(*d)) && *(skipspace(d)) != ',') {
+ if (*d == ';' || isSPACE(*d) || *d == '}' || !*d) {
s = scan_num(s);
/* real VERSION number -- GBARR */
version = yylval.opval;