* Massachusetts.
*
* Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,
- * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
+ * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free
+ * Software Foundation, Inc.
*
* Enhancements Copyright 2005 Alessandro Scotti
*
PieceToChar (ChessSquare p)
{
int c;
- if((int)p < 0 || (int)p >= (int)EmptySquare) return('x'); /* [HGM] for safety */
+ if((int)p < 0 || (int)p >= (int)EmptySquare) return('?'); /* [HGM] for safety */
c = pieceToChar[(int) p];
if(c & 128) c = c & 63 | 64;
return c;
if(pieceToChar[piece] != '+') { ok = FALSE; continue; } // promoted form does not exist
}
ASSIGN(pieceDesc[piece], p);
- if(piece < BlackPawn && (pieceToChar[WHITE_TO_BLACK piece] == pieceToChar[piece] || promoted)) {
+ if(piece < BlackPawn && (pieceToChar[WHITE_TO_BLACK piece] == pieceToChar[piece] + 32 || promoted)) {
ASSIGN(pieceDesc[WHITE_TO_BLACK piece], p);
}
pieceDefs = TRUE;