From 5646c8c2b8848315cafe4478756af81edeb78d18 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Mon, 20 Apr 2026 22:05:25 +0100 Subject: [PATCH] term: update write_string function references --- term/error.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/term/error.c b/term/error.c index 2b0bc49..96f9633 100644 --- a/term/error.c +++ b/term/error.c @@ -19,18 +19,18 @@ static void get_error_id( fx_stringstream *id = fx_stringstream_create_with_buffer(out, max); if (vendor_name) { - fx_stream_write_string(id, vendor_name, NULL); + fx_stream_write_cstr(id, vendor_name, NULL); } if (error_name) { if (vendor_name) { - fx_stream_write_string(id, ".", NULL); + fx_stream_write_cstr(id, ".", NULL); } - fx_stream_write_string(id, error_name, NULL); + fx_stream_write_cstr(id, error_name, NULL); } else { if (vendor_name) { - fx_stream_write_string(id, "#", NULL); + fx_stream_write_cstr(id, "#", NULL); } fx_stream_write_fmt(id, NULL, "%ld", code); @@ -125,6 +125,10 @@ static void print_content( const struct fx_error_template_parameter *params, size_t nr_params, const char *s) { + if (!s) { + return; + } + char modifier = 0; char buf[128]; size_t buf_len = 0;