array: Compute new size properly
authorBenjamin Otte <otte@redhat.com>
Wed, 20 Sep 2023 00:46:47 +0000 (02:46 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 28 Sep 2023 00:42:45 +0000 (20:42 -0400)
commitbbe7e8555d358ddb61cd19ef07e90d9a5c9a8494
treeaf208b3b99bf22d5b74161d37ae18987a0d0d575
parentdf4f716ea0f98ddb660dfe8adc83a1cae3252810
array: Compute new size properly

Using "1 << x" means that we are shifting a signed 32bit integer, but we
want a gsize, which is an unsigned 64bit integer.

So now we don't overflow anymore if the array reaches a size of 2GB.
gdk/gdkarrayimpl.c