From 2f9505502fc5749fef69b36504fe9df66443ebf4 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 29 Jul 2016 19:16:50 +0200 Subject: [PATCH] fixed bug with non-element images from dynamic configuration being scaled --- src/init.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/init.c b/src/init.c index ff6c5767..74ea88a0 100644 --- a/src/init.c +++ b/src/init.c @@ -195,22 +195,23 @@ void InitElementSmallImages() print_timestamp_time("getImageListPropertyMapping/Size"); print_timestamp_init("InitElementSmallImagesScaledUp (1)"); - /* initialize normal images from static configuration */ + /* initialize normal element images from static configuration */ for (i = 0; element_to_graphic[i].element > -1; i++) InitElementSmallImagesScaledUp(element_to_graphic[i].graphic); print_timestamp_done("InitElementSmallImagesScaledUp (1)"); - /* initialize special images from static configuration */ + /* initialize special element images from static configuration */ for (i = 0; element_to_special_graphic[i].element > -1; i++) InitElementSmallImagesScaledUp(element_to_special_graphic[i].graphic); print_timestamp_time("InitElementSmallImagesScaledUp (2)"); - /* initialize images from dynamic configuration (may be elements or other) */ + /* initialize element images from dynamic configuration */ for (i = 0; i < num_property_mappings; i++) - InitElementSmallImagesScaledUp(property_mapping[i].artwork_index); + if (property_mapping[i].base_index < MAX_NUM_ELEMENTS) + InitElementSmallImagesScaledUp(property_mapping[i].artwork_index); print_timestamp_time("InitElementSmallImagesScaledUp (3)"); - /* initialize special images from above list (non-element images) */ + /* initialize special non-element images from above list */ for (i = 0; special_graphics[i] > -1; i++) InitElementSmallImagesScaledUp(special_graphics[i]); print_timestamp_time("InitElementSmallImagesScaledUp (4)"); -- 2.34.1