When we run out of background colours for chains and wrap back to the

beginning, we should wrap back to COL_B0+1 rather than COL_B0 itself,
so as not to reuse white. White should be special, and always indicate
a properly numbered square.

[originally from svn r9305]
This commit is contained in:
Simon Tatham
2011-09-18 07:43:18 +00:00
parent 7f8919952f
commit 295fb9fd83

View File

@ -1812,8 +1812,8 @@ static int num2col(game_drawstate *ds, int num)
{ {
int set = num / (ds->n+1); int set = num / (ds->n+1);
if (num <= 0) return COL_B0; if (num <= 0 || set == 0) return COL_B0;
return COL_B0 + (set % 16); return COL_B0 + 1 + ((set-1) % 15);
} }
#define ARROW_HALFSZ (7 * TILE_SIZE / 32) #define ARROW_HALFSZ (7 * TILE_SIZE / 32)