From b4c1c7d754d144b1821522e9cfa62c11c5efffa9 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 8 Mar 2025 05:44:47 -0700 Subject: [PATCH] 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. --- utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utf8.c b/utf8.c index 90ec77026412..d72929cee552 100644 --- a/utf8.c +++ b/utf8.c @@ -2240,7 +2240,7 @@ Perl_utf8_to_uv_msgs_helper_(const U8 * const s0, * function */ assert(0); - message = Perl_form(aTHX_ "%s (empty string)", malformed_text); + message = Perl_form(aTHX_ "%s: (empty string)", malformed_text); break; case UTF8_GOT_CONTINUATION: