From: Rico Tzschichholz Date: Mon, 17 Jun 2019 10:59:12 +0000 (+0200) Subject: tests: Null-terminate arrays for compatibility test of uint8 and uchar X-Git-Tag: 0.36.20~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a10d63b87022b6d1f23f1e498db2b38e92e9e547;p=thirdparty%2Fvala.git tests: Null-terminate arrays for compatibility test of uint8 and uchar Fixes https://gitlab.gnome.org/GNOME/vala/issues/809 --- diff --git a/tests/basic-types/array-uint8-uchar-compat.vala b/tests/basic-types/array-uint8-uchar-compat.vala index 91ac3751d..352be9a98 100644 --- a/tests/basic-types/array-uint8-uchar-compat.vala +++ b/tests/basic-types/array-uint8-uchar-compat.vala @@ -27,8 +27,8 @@ void change_buffer2 ([CCode (array_length = false)] uchar[] data) { void main () { { - data = { 'f', 'o', 'o', '\n' }; - data2 = { 102, 111, 111, 10 }; + data = { 'f', 'o', 'o', '\n', '\0' }; + data2 = { 102, 111, 111, 10, 0 }; assert ("foo\n" == (string) data); change_buffer (get_buffer ()); assert ("bar\n" == (string) data); @@ -38,8 +38,8 @@ void main () { } { - data = { 'f', 'o', 'o', '\n' }; - data2 = { 102, 111, 111, 10 }; + data = { 'f', 'o', 'o', '\n', '\0' }; + data2 = { 102, 111, 111, 10, 0 }; assert ("foo\n" == (string) data2); change_buffer2 (get_buffer2 ()); assert ("baz\n" == (string) data2);