mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ci: fix -fsanitize=address for c_array_test.c
This commit is contained in:
parent
42c0bae9ce
commit
3c23eebe51
@ -7,9 +7,9 @@ void* gen_c_array(int size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void* gen_c_int_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++) {
|
for(int i = 0; i < size; i++) {
|
||||||
c_array[i] = i & 0xFF;
|
c_array[i] = i;
|
||||||
}
|
}
|
||||||
return c_array;
|
return c_array;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user