From e12e81a02d15fe206f4cd2c14d6db25041ade473 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 26 Apr 2024 10:28:47 +0100 Subject: [PATCH] gdatetime: Fix string type used to initialise array MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes commit 057f0fcbfba3b7c4e4b8730154bad9e5118a3ef8. I didn’t notice that `tmp` is an array of strings, not an array of chars, and somehow my compiler didn’t warn. Seems only the macOS CI job is spotting the problem here. Signed-off-by: Philip Withnall --- glib/gdatetime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gdatetime.c b/glib/gdatetime.c index 870edc124cc..8cc501c9a48 100644 --- a/glib/gdatetime.c +++ b/glib/gdatetime.c @@ -3104,7 +3104,7 @@ format_number (GString *str, "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }; const gchar * const *digits = ascii_digits; - const gchar *tmp[10] = { '\0', }; + const gchar *tmp[10] = { NULL, }; gint i = 0; #ifdef HAVE_LANGINFO_OUTDIGIT static GMutex alt_digits_mutex;