From 8062a027e7c62cfe289ce1a33006f97a8e8c8e6d Mon Sep 17 00:00:00 2001 From: Andy2 Date: Mon, 17 Oct 2011 06:48:13 -0700 Subject: [PATCH] cleanup: NULL's a legal value now. --- xwords4/common/server.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/xwords4/common/server.c b/xwords4/common/server.c index 14409bdae..592056172 100644 --- a/xwords4/common/server.c +++ b/xwords4/common/server.c @@ -2375,11 +2375,11 @@ sendUndoToClientsExcept( ServerCtxt* server, XP_U16 skip, } } /* sendUndoToClientsExcept */ +/* This is unused on Android where I've disabled undo in networked games. */ static XP_Bool reflectUndos( ServerCtxt* server, XWStreamCtxt* stream, XW_Proto code ) { XP_U16 nUndone, lastUndone; - XP_S16 moveNum; XP_U16 turn; ModelCtxt* model = server->vol.model; XP_Bool success = XP_TRUE; @@ -2387,13 +2387,9 @@ reflectUndos( ServerCtxt* server, XWStreamCtxt* stream, XW_Proto code ) nUndone = stream_getU16( stream ); lastUndone = stream_getU16( stream ); - moveNum = lastUndone + nUndone - 1; - - success = model_undoLatestMoves(model, server->pool, nUndone, &turn, - &moveNum); - + success = model_undoLatestMoves( model, server->pool, nUndone, &turn, + NULL ); if ( success ) { - XP_ASSERT( moveNum == lastUndone ); if ( code == XWPROTO_UNDO_INFO_CLIENT ) { /* need to inform */ XP_U16 sourceClientIndex =