changeset 27392:f28981b3f233

Fix wrong behavior with slave command by going back to the starting point of the play_tree to pop all existing configurations. Patch by Mathieu Schroeter <mathieu dot schroeter at gamesover dot ch>.
author ben
date Thu, 07 Aug 2008 09:53:59 +0000
parents 1d2faa1020fb
children 4876c89bafdd
files command.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/command.c	Thu Aug 07 08:58:07 2008 +0000
+++ b/command.c	Thu Aug 07 09:53:59 2008 +0000
@@ -2655,6 +2655,10 @@
 	    break;
 
 	case MP_CMD_STOP:
+	    // Go back to the starting point.
+	    while (play_tree_iter_up_step
+		   (mpctx->playtree_iter, 0, 1) != PLAY_TREE_ITER_END)
+		/* NOP */ ;
 	    mpctx->eof = PT_STOP;
 	    brk_cmd = 1;
 	    break;