Skip to content

Commit 7b4de2b

Browse files
committed
utf8_to_uv_msgs: Make warning message consistent
This inserts a colon in the message to make it consistent with all the other similar ones. This will enable easier parsing of messages for future commits. If this change causes failures in any code in the field, that would be a Good Thing, as that code is now illegal. This message happens only when this function is called with a zero length string, which has been illegal for some releases. Doing this in a DEBUGGING build results in an assert(0). This message now only exists as a fallback to prevent bad or undefined behavior, should we get called with that anyway.
1 parent 2001bed commit 7b4de2b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

utf8.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2239,8 +2239,7 @@ Perl_utf8_to_uv_msgs_helper_(const U8 * const s0,
22392239
* caller. If you have nothing to decode, skip calling this
22402240
* function */
22412241

2242-
assert(0);
2243-
message = Perl_form(aTHX_ "%s (empty string)", malformed_text);
2242+
message = Perl_form(aTHX_ "%s: (empty string)", malformed_text);
22442243
break;
22452244

22462245
case UTF8_GOT_CONTINUATION:

0 commit comments

Comments
 (0)