summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-07-24 07:39:30 -0600
committerKarl Williamson <khw@cpan.org>2021-07-30 06:11:46 -0600
commit78c56b66b39a897f75d88cb46fd7f979b74110fe (patch)
tree9fc002e1d6302c94aa042f4813690628c7397f5a /sv.c
parent43d69053867da374ff9077af05e899312924c05d (diff)
downloadperl-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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index b6ce11ee98..e305c1e77c 100644
--- a/sv.c
+++ b/sv.c
@@ -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, "\"");