]> git.ipfire.org Git - thirdparty/vala.git/commit
codegen: Improve array-dup-wrapper for empty arrays 48679761c7298f14bdab9c6ea3bd4c48db192cf5
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 24 May 2020 17:25:41 +0000 (19:25 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 27 May 2020 07:35:40 +0000 (09:35 +0200)
commit48679761c7298f14bdab9c6ea3bd4c48db192cf5
treee36e904611ec08c60ff0d8e8e3703f9d1a19eab2
parenta2903dcaf009afbe08b4a8ce22e892e6003c1ccc
codegen: Improve array-dup-wrapper for empty arrays

Guard against negative lengths and consistently return NULL if allocated
size would be 0.

See https://gitlab.gnome.org/GNOME/vala/issues/999
codegen/valaccodearraymodule.vala
tests/Makefile.am
tests/arrays/empty-length-0.vala [new file with mode: 0644]