mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Merge pull request #88 from ailin-nemui/arraycopy
fix missing len in g_array_copy
This commit is contained in:
commit
47b0661e96
@ -96,6 +96,7 @@ GArray *g_array_copy(GArray *array)
|
|||||||
elt_size = g_array_get_element_size(array);
|
elt_size = g_array_get_element_size(array);
|
||||||
out = g_array_sized_new(FALSE, FALSE, elt_size, array->len);
|
out = g_array_sized_new(FALSE, FALSE, elt_size, array->len);
|
||||||
memcpy(out->data, array->data, array->len * elt_size);
|
memcpy(out->data, array->data, array->len * elt_size);
|
||||||
|
out->len = array->len;
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user