Skip to content

Commit

Permalink
gdatetime: Fix string type used to initialise array
Browse files Browse the repository at this point in the history
This fixes commit 057f0fc. 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 <[email protected]>
  • Loading branch information
pwithnall committed Apr 26, 2024
1 parent 640ff0c commit e12e81a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glib/gdatetime.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e12e81a

Please sign in to comment.