Menu

#124 Crash if "remove moves from beginning" at starting position

closed-fixed
None
7
2009-06-29
2009-06-23
No

"Remove moves from the beginning" makes ChessX crash when applied to a position that is already the starting one.

Discussion

  • Alessandro Gandelli

    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;

     
  • Bruno Rizzuti

    Bruno Rizzuti - 2009-06-29

    Patch applied, thanks Alessandro.

     
  • Bruno Rizzuti

    Bruno Rizzuti - 2009-06-29
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB