Skip to content

Commit

Permalink
uvoffuni_to_utf8_flags_msgs(): Return proper bit
Browse files Browse the repository at this point in the history
More rigorous testing, yet to be committed, showed that this was returning
the wrong bit in some circumstances.  It is supposed to return the bit
corresponding to the most restrictive flag that is passed as input to
the function
  • Loading branch information
khwilliamson committed Nov 27, 2024
1 parent 4027c9d commit 5f8a785
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV input_uv, UV flags, HV** msgs)
if (msgs) {
*msgs = new_msg_hv(Perl_form(aTHX_ format, input_uv),
category,
UNICODE_GOT_PERL_EXTENDED);
(flags & UNICODE_WARN_PERL_EXTENDED)
? UNICODE_GOT_PERL_EXTENDED
: UNICODE_GOT_SUPER);
}
else {
Perl_ck_warner_d(aTHX_ category, format, input_uv);
Expand Down

0 comments on commit 5f8a785

Please sign in to comment.