From cd95c02af6cdc2f9da9ee9f7914d2d49912f9fdb Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Wed, 2 Mar 2016 15:18:58 +0100 Subject: [PATCH] Fix crash on changing piece directory The loop for deleting the old pieces in ActivateTheme was still assuming the four promo-Golds were stored behind the normal set, which for the new piece ordering isn't the case anymore. --- draw.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/draw.c b/draw.c index fca16eb..16c4b0d 100644 --- a/draw.c +++ b/draw.c @@ -109,7 +109,7 @@ cairo_surface_t *csBoardWindow; static cairo_surface_t *pngPieceImages[2][(int)BlackPawn]; // png 256 x 256 images static cairo_surface_t *pngPieceBitmaps[2][(int)BlackPawn]; // scaled pieces as used static cairo_surface_t *pngPieceBitmaps2[2][(int)BlackPawn]; // scaled pieces in store -static RsvgHandle *svgPieces[2][(int)BlackPawn+4]; // vector pieces in store +static RsvgHandle *svgPieces[2][(int)BlackPawn]; // vector pieces in store static cairo_surface_t *pngBoardBitmap[2], *pngOriginalBoardBitmap[2]; int useTexture, textureW[2], textureH[2]; @@ -451,7 +451,7 @@ InitDrawingParams (int reloadPieces) { int i, p; if(reloadPieces) - for(i=0; i<2; i++) for(p=0; p