diff options
author | Karl Williamson <khw@cpan.org> | 2021-07-24 07:39:30 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-07-30 06:11:46 -0600 |
commit | 78c56b66b39a897f75d88cb46fd7f979b74110fe (patch) | |
tree | 9fc002e1d6302c94aa042f4813690628c7397f5a /sv.c | |
parent | 43d69053867da374ff9077af05e899312924c05d (diff) | |
download | perl-78c56b66b39a897f75d88cb46fd7f979b74110fe.tar.gz |
sv_vcatpvfn(): Simplify print format
The print took a character, cast it to UV and then printed it as an
octal UV. But why not just print it as an unsigned octal character?
The code that did this was part of a sweeping commit of a bunch of
things, so no explanation there.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -13306,8 +13306,7 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p if (isPRINT(*f)) { sv_catpvn_nomg(msg, f, 1); } else { - Perl_sv_catpvf(aTHX_ msg, - "\\%03" UVof, (UV)*f & 0xFF); + Perl_sv_catpvf(aTHX_ msg, "\\%03o", (U8) *f); } } sv_catpvs(msg, "\""); |