Skip to content

Commit 5f8a785

Browse files
committed
uvoffuni_to_utf8_flags_msgs(): Return proper bit
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
1 parent 4027c9d commit 5f8a785

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utf8.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV input_uv, UV flags, HV** msgs)
234234
if (msgs) {
235235
*msgs = new_msg_hv(Perl_form(aTHX_ format, input_uv),
236236
category,
237-
UNICODE_GOT_PERL_EXTENDED);
237+
(flags & UNICODE_WARN_PERL_EXTENDED)
238+
? UNICODE_GOT_PERL_EXTENDED
239+
: UNICODE_GOT_SUPER);
238240
}
239241
else {
240242
Perl_ck_warner_d(aTHX_ category, format, input_uv);

0 commit comments

Comments
 (0)