summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2019-05-02 17:37:16 -0400
committerMarek Olšák <marek.olsak@amd.com>2019-06-03 16:02:13 -0400
commitea68991fafaa729e49f1efbb1b38e3bc511249bf (patch)
tree83c950da89d04014f0d91a7879be381470a38f19
parenta61de5447390d080d2cb30db74549ad9e1498af6 (diff)
rendermode-feedback: fix a crash
For some reason, the last element is uninitialized if I don't clear the structure like this.
-rw-r--r--tests/spec/gl-1.0/rendermode-feedback.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/spec/gl-1.0/rendermode-feedback.c b/tests/spec/gl-1.0/rendermode-feedback.c
index 2260370a3..3a46ab4b7 100644
--- a/tests/spec/gl-1.0/rendermode-feedback.c
+++ b/tests/spec/gl-1.0/rendermode-feedback.c
@@ -101,14 +101,13 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
piglit_config = &config;
- struct piglit_subtest tests[ARRAY_SIZE(types) + 1];
+ struct piglit_subtest tests[ARRAY_SIZE(types) + 1] = {};
for (unsigned i = 0; i < ARRAY_SIZE(types); ++i) {
tests[i].name = piglit_get_gl_enum_name(types[i].type);
tests[i].option = tests[i].name;
tests[i].subtest_func = run_subtest;
tests[i].data = (void *)&types[i];
}
- tests[ARRAY_SIZE(types)] = (struct piglit_subtest){ 0 };
config.subtests = tests;
config.supports_gl_compat_version = 10;