From: Christian Heller Date: Mon, 10 Mar 2014 14:56:42 +0000 (+0100) Subject: Avoid doing arithmetic on a void pointer. X-Git-Tag: tce~824 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/te"st.html?a=commitdiff_plain;h=f8c8dd2e9da8323251fae5e464098228d1dcce60;p=plomrogue Avoid doing arithmetic on a void pointer. --- diff --git a/src/client/misc.c b/src/client/misc.c index 9d7539e..45482ad 100644 --- a/src/client/misc.c +++ b/src/client/misc.c @@ -162,7 +162,7 @@ extern void array_append(uint32_t old_n, size_t region_size, void * new_region, char * f_name = "array_append()"; uint32_t old_size = old_n * region_size; uint32_t new_size = old_size + region_size; - void * new_array = try_malloc(new_size, f_name); + char * new_array = try_malloc(new_size, f_name); memcpy(new_array, * ptr_old_array, old_size); memcpy(new_array + (old_n * region_size), new_region, region_size); free(* ptr_old_array);