summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorGisle Aas <gisle@aas.no>1998-10-16 18:33:12 +0200
committerGurusamy Sarathy <gsar@cpan.org>1998-10-25 05:07:42 +0000
commite3fdf9887934783dd5692982e11c048eb7c97265 (patch)
tree55fe2157c576fa4f940673716fe3667a84b80b3c /util.c
parentb03b9beb4aad24925326d26b7ad4ddf7ed2dbfea (diff)
downloadperl-e3fdf9887934783dd5692982e11c048eb7c97265.tar.gz
disallow 'x' in hex numbers (except leading '0x')
Message-ID: <m3n26wtw47.fsf@furu.g.aas.no> Subject: Re: [PATCH 5.005_52] 'x' is not a legal hex digit p4raw-id: //depot/perl@2054
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index e47b95d001..873fcd80b7 100644
--- a/util.c
+++ b/util.c
@@ -2451,7 +2451,7 @@ scan_hex(char *start, I32 len, I32 *retlen)
while (len-- && *s) {
tmp = strchr((char *) PL_hexdigit, *s++);
if (!tmp) {
- if (*(s-1) == '_')
+ if (*(s-1) == '_' || (*(s-1) == 'x' && retval == 0))
continue;
else {
dTHR;