"Remove moves from the beginning" makes ChessX crash when applied to a position that is already the starting one.
here's a dumb workaround: Index: C:/Users/gandy/Documents/chessx/chessxQtCreator/chessx/src/database/game.cpp =================================================================== --- C:/Users/gandy/Documents/chessx/chessxQtCreator/chessx/src/database/game.cpp (revisione 946) +++ C:/Users/gandy/Documents/chessx/chessxQtCreator/chessx/src/database/game.cpp (copia locale) @@ -217,7 +217,7 @@ int node = m_moveNodes[m_currentNode].nextNode; removeNode(node); } - else if (position == BeforeMove) { + else if (position == BeforeMove && m_currentNode != 0) { MoveNode firstNode; firstNode.nextNode = m_currentNode; firstNode.ply = m_moveNodes[m_currentNode].ply - 1;
Patch applied, thanks Alessandro.
Log in to post a comment.
here's a dumb workaround:
Index: C:/Users/gandy/Documents/chessx/chessxQtCreator/chessx/src/database/game.cpp
===================================================================
--- C:/Users/gandy/Documents/chessx/chessxQtCreator/chessx/src/database/game.cpp (revisione 946)
+++ C:/Users/gandy/Documents/chessx/chessxQtCreator/chessx/src/database/game.cpp (copia locale)
@@ -217,7 +217,7 @@
int node = m_moveNodes[m_currentNode].nextNode;
removeNode(node);
}
- else if (position == BeforeMove) {
+ else if (position == BeforeMove && m_currentNode != 0) {
MoveNode firstNode;
firstNode.nextNode = m_currentNode;
firstNode.ply = m_moveNodes[m_currentNode].ply - 1;
Patch applied, thanks Alessandro.