Reset win/loss counters before match
authorH.G. Muller <h.g.muller@hccnet.nl>
Sat, 8 Jan 2011 23:15:18 +0000 (00:15 +0100)
committerArun Persaud <arun@nubati.net>
Tue, 11 Jan 2011 05:22:04 +0000 (21:22 -0800)
The win/loss counters were not reset, because the code counted on them
being initialized to zero. But with matches startable from the menu,
this is no longer true after the first match.

winboard/winboard.c

index 43dfeed..4f0fc10 100644 (file)
@@ -4847,6 +4847,7 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
       matchMode = 2;// distinguish from command-line-triggered case (matchMode=1)\r
       appData.matchGames = appData.defaultMatchGames;\r
       matchGame = 1;\r
+      first.matchWins = second.matchWins = 0;\r
 \r
     case IDM_TwoMachines:\r
       TwoMachinesEvent();\r