diff options
author | TAKAI Kousuke <62541129+t-a-k@users.noreply.github.com> | 2020-10-23 02:14:57 +0900 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-12-07 21:52:14 -0700 |
commit | c279f3d0680f86f0de539f6491362e428af4fbd0 (patch) | |
tree | 822091ad0aa684560cc217748730f38b49725afc /pp.c | |
parent | b15e443511c11c1f196c5a5ca57b89feed452a07 (diff) | |
download | perl-c279f3d0680f86f0de539f6491362e428af4fbd0.tar.gz |
pp.c: oct() now skips "0o" and "o" prefix.
t/op/oct.t: Add test for oct() with 0o and o prefix.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3099,8 +3099,12 @@ PP(pp_oct) flags |= PERL_SCAN_DISALLOW_PREFIX; result_uv = grok_bin (tmps, &len, &flags, &result_nv); } - else + else { + if (isALPHA_FOLD_EQ(*tmps, 'o')) { + tmps++, len--; + } result_uv = grok_oct (tmps, &len, &flags, &result_nv); + } if (flags & PERL_SCAN_GREATER_THAN_UV_MAX) { SETn(result_nv); |