diff --git a/vlib/v/tests/c_array_test.c b/vlib/v/tests/c_array_test.c index 6f9bdaa32a..8617a92867 100644 --- a/vlib/v/tests/c_array_test.c +++ b/vlib/v/tests/c_array_test.c @@ -7,9 +7,9 @@ void* gen_c_array(int size) { } void* gen_c_int_array(int size) { - int *c_array = malloc(size); + int *c_array = malloc(size * sizeof(int)); for(int i = 0; i < size; i++) { - c_array[i] = i & 0xFF; + c_array[i] = i; } return c_array; }