From cca5a5d6cce6fd11a94bb6219916136a08ed0657 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 26 Jun 2013 02:42:14 +0200 Subject: whoops MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/argparser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/argparser.c b/src/argparser.c index a6452fb..bb1f3ce 100644 --- a/src/argparser.c +++ b/src/argparser.c @@ -1503,7 +1503,7 @@ static void _map_free(void** level, long has_value) if ((value = *(level + 16))) { if (args_map_values_ptr == args_map_values_size) - args_map_values = (void**)realloc(args_map_values_size <<= 1, sizeof(void*)); + args_map_values = (void**)realloc(args_map_values, (args_map_values_size <<= 1) * sizeof(void*)); *(args_map_values + args_map_values_ptr++) = value; } free(level); @@ -1526,7 +1526,7 @@ static void** map_free(args_Map* map) args_map_values = (void**)malloc(64 * sizeof(void*)); _map_free(map->data, true); if (args_map_values_ptr == args_map_values_size) - args_map_values = (void**)realloc(args_map_values_size + 1, sizeof(void*)); + args_map_values = (void**)realloc(args_map_values, (args_map_values_size + 1) * sizeof(void*)); *(args_map_values + args_map_values_ptr) = null; return args_map_values; } -- cgit v1.2.3-70-g09d2