Fix WinBoard Lance bug
authorH.G. Muller <h.g.muller@hccnet.nl>
Sun, 10 Oct 2010 19:23:09 +0000 (21:23 +0200)
committerArun Persaud <arun@nubati.net>
Sat, 16 Oct 2010 02:21:22 +0000 (19:21 -0700)
The choice between Lance and Queen was made on appData.variant, in stead
of gameInfo.variant. Because of this it was not always up-to-date in ICS
games.

winboard/winboard.c

index 84f38fb..e92a265 100644 (file)
@@ -2459,7 +2459,7 @@ InitDrawingSizes(BoardSize boardSize, int flags)
   pieceBitmap[2][WhiteBishop] = DoLoadBitmap(hInst, "b", squareSize, "w");\r
   pieceBitmap[2][WhiteRook] = DoLoadBitmap(hInst, "r", squareSize, "w");\r
   pieceBitmap[2][WhiteKing] = DoLoadBitmap(hInst, "k", squareSize, "w");\r
-  if( !strcmp(appData.variant, "shogi") && (squareSize==72 || squareSize==49)) {\r
+  if( gameInfo.variant == VariantShogi && (squareSize==72 || squareSize==49)) {\r
     // in Shogi, Hijack the unused Queen for Lance\r
     pieceBitmap[0][WhiteQueen] = DoLoadBitmap(hInst, "l", squareSize, "s");\r
     pieceBitmap[1][WhiteQueen] = DoLoadBitmap(hInst, "l", squareSize, "o");\r