mirror of https://github.com/GNOME/gimp.git
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:
parent
3fd21f98cf
commit
8c1414eb02
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue