fixed bug which could cause a crash due to an array index overflow
authorHolger Schemel <info@artsoft.org>
Sun, 30 Apr 2017 18:55:53 +0000 (20:55 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 30 Apr 2017 18:55:53 +0000 (20:55 +0200)
src/init.c

index d5a66835964e794a78a17a3c219207deb1b6aea1..8a741fcba844807fb44edc76448e535e1275ba54 100644 (file)
@@ -413,7 +413,7 @@ void InitFontGraphicInfo()
     int special = property_mapping[i].ext3_index;
     int graphic = property_mapping[i].artwork_index;
 
-    if (font_nr < 0)
+    if (font_nr < 0 || font_nr >= NUM_FONTS)
       continue;
 
     if (IS_SPECIAL_GFX_ARG(special))