Add missing array sentinel value

This commit is contained in:
Přemysl Eric Janouch 2022-07-19 16:08:12 +02:00
parent 26dead7ea4
commit a9a9d69a92
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 2 additions and 1 deletions

View File

@ -3244,7 +3244,8 @@ fiv_io_model_init(FivIoModel *self)
g_strfreev(types); g_strfreev(types);
gsize n = g_strv_length(globs); gsize n = g_strv_length(globs);
self->supported_patterns = g_malloc0_n(n, sizeof *self->supported_patterns); self->supported_patterns =
g_malloc0_n(n + 1, sizeof *self->supported_patterns);
while (n--) while (n--)
self->supported_patterns[n] = g_pattern_spec_new(globs[n]); self->supported_patterns[n] = g_pattern_spec_new(globs[n]);
g_strfreev(globs); g_strfreev(globs);