Commit 8bbc8ab8 authored by Matt Turner's avatar Matt Turner

run.c: realloc correct size.

Ken imported more shaders, and we crossed the 32k boundary where we need
to realloc, uncovering this bug.
parent c584a2fc
......@@ -240,7 +240,7 @@ gather_shader_test(const char *fpath, const struct stat *sb, int typeflag)
if (unlikely(shader_test_size < shader_test_length)) {
shader_test_size *= 2;
shader_test = realloc(shader_test, shader_test_size * sizeof(char *));
shader_test = realloc(shader_test, shader_test_size * sizeof(struct shader_test));
}
shader_test[shader_test_length].filename = malloc(strlen(fpath) + 1);
memcpy(shader_test[shader_test_length].filename, fpath, strlen(fpath) + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment