From e1ab16459d6b624722e412868ae30d9ed37e97d3 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 22 Nov 2020 21:53:57 -0600 Subject: [PATCH] Update: handle F_incomplete_utf status. --- level_2/fll_error/c/private-error.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/level_2/fll_error/c/private-error.c b/level_2/fll_error/c/private-error.c index 46ab32f..744283d 100644 --- a/level_2/fll_error/c/private-error.c +++ b/level_2/fll_error/c/private-error.c @@ -86,6 +86,19 @@ extern "C" { return F_false; } + if (status == F_incomplete_utf) { + if (error.verbosity != f_console_verbosity_quiet) { + fprintf(error.to.stream, "%c", f_string_eol[0]); + fprintf(error.to.stream, "%s%sInvalid (incomplete) UTF-8 character while calling ", error.context.before->string, error.prefix ? error.prefix : ""); + + private_fll_error_print_function(error, function); + + fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol[0]); + } + + return F_false; + } + if (fallback && error.verbosity != f_console_verbosity_quiet) { if (error.verbosity != f_console_verbosity_quiet) { fprintf(error.to.stream, "%c", f_string_eol[0]); -- 1.8.3.1