From f15bae46d25f8760b97a694f97c9d81954b300b7 Mon Sep 17 00:00:00 2001 From: ehouse Date: Tue, 15 Mar 2005 15:13:52 +0000 Subject: [PATCH] add assert --- common/model.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/model.c b/common/model.c index 19f263b05..5444fd65b 100644 --- a/common/model.c +++ b/common/model.c @@ -1308,7 +1308,9 @@ model_assignPlayerTiles( ModelCtxt* model, XP_S16 turn, TrayTileSet* tiles ) XP_U16 model_getNumTilesInTray( ModelCtxt* model, XP_S16 turn ) { - PlayerCtxt* player = &model->players[turn]; + PlayerCtxt* player; + XP_ASSERT( turn >= 0 ); + player = &model->players[turn]; return player->trayTiles.nTiles; } /* model_getNumPlayerTiles */