app: fix gimp_g_value_get_memsize() with GStrv value.

Since GStrv are NULL-terminated arrays, there is always one additional
pointer (NULL).
This is a detail, but still, wrong since commit 8eb7f6df9e which
replaced GimpStringArray by GStrv usage.
This commit is contained in:
Jehan 2022-05-24 15:54:08 +02:00
parent 3fd21f98cf
commit 8c1414eb02
1 changed files with 2 additions and 2 deletions

View File

@ -232,13 +232,13 @@ gimp_g_value_get_memsize (GValue *value)
}
else if (G_VALUE_HOLDS (value, G_TYPE_STRV))
{
char **array = g_value_get_boxed (value);
gchar **array = g_value_get_boxed (value);
if (array)
{
guint length = g_strv_length (array);
memsize += length * sizeof (gchar *);
memsize += (length + 1) * sizeof (gchar *);
for (gint i = 0; i < length; i++)
memsize += gimp_string_get_memsize (array[i]);
}