diff --git a/gdk/gdkarrayimpl.c b/gdk/gdkarrayimpl.c index 25ae54029f..8eec67bc6e 100644 --- a/gdk/gdkarrayimpl.c +++ b/gdk/gdkarrayimpl.c @@ -183,7 +183,7 @@ gdk_array(reserve) (GdkArray *self, return; size = gdk_array(get_size) (self); - new_size = 1 << g_bit_storage (MAX (GDK_ARRAY_REAL_SIZE (n), 16) - 1); + new_size = ((gsize) 1) << g_bit_storage (MAX (GDK_ARRAY_REAL_SIZE (n), 16) - 1); #ifdef GDK_ARRAY_PREALLOC if (self->start == self->preallocated)