Skip to content

Commit

Permalink
sv_vcatpvfn(): Simplify print format
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
khwilliamson committed Jul 24, 2021
1 parent a106cb6 commit 8dfa130
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sv.c
Expand Up @@ -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, "\"");
Expand Down

0 comments on commit 8dfa130

Please sign in to comment.