From 02c0df93e6fd31fecc2ca59f83ecb3eaaba889d9 Mon Sep 17 00:00:00 2001 From: Boris Zentner Date: Thu, 27 Oct 2016 21:52:58 +0200 Subject: [PATCH] sym->row_height is 200 now clear it more reliable. --- backend/library.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/library.c b/backend/library.c index 38530879..d8865ad4 100644 --- a/backend/library.c +++ b/backend/library.c @@ -43,7 +43,6 @@ struct zint_symbol *ZBarcode_Create() { struct zint_symbol *symbol; - int i; symbol = (struct zint_symbol*) malloc(sizeof (*symbol)); if (!symbol) return NULL; @@ -67,9 +66,7 @@ struct zint_symbol *ZBarcode_Create() { symbol->input_mode = DATA_MODE; strcpy(symbol->primary, ""); memset(&(symbol->encoded_data[0][0]), 0, sizeof (symbol->encoded_data)); - for (i = 0; i < 178; i++) { - symbol->row_height[i] = 0; - } + memset(&(symbol->row_height[0]), 0, sizeof (symbol->row_height)); symbol->bitmap = NULL; symbol->bitmap_width = 0; symbol->bitmap_height = 0;