summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorBo Lindbergh <blgl@stacken.kth.se>2010-07-05 01:31:01 +0200
committerDavid Golden <dagolden@cpan.org>2010-07-06 08:01:47 -0400
commita674e8db187f4e33b2e6b9341cc0e30fbcf75bd2 (patch)
tree2d8b986c47f3f1b308aaf815684f073e049ab0f3 /toke.c
parent333f87f24de2f15740185612410ef911ccfed6a3 (diff)
downloadperl-a674e8db187f4e33b2e6b9341cc0e30fbcf75bd2.tar.gz
Code for allowing uppercase X/B in hexadecimal/binary numbers (#76296).
Signed-off-by: David Golden <dagolden@cpan.org>
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toke.c b/toke.c
index 0decca85dd..b7b33e87b1 100644
--- a/toke.c
+++ b/toke.c
@@ -12978,11 +12978,11 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp)
const char *base, *Base, *max;
/* check for hex */
- if (s[1] == 'x') {
+ if (s[1] == 'x' || s[1] == 'X') {
shift = 4;
s += 2;
just_zero = FALSE;
- } else if (s[1] == 'b') {
+ } else if (s[1] == 'b' || s[1] == 'B') {
shift = 1;
s += 2;
just_zero = FALSE;