fix bug: include wordlist name in bad word info passed into util function

This commit is contained in:
Eric House 2012-12-29 07:48:31 -08:00
parent ad2b925a60
commit 78670e9650
2 changed files with 4 additions and 2 deletions

View file

@ -743,12 +743,14 @@ warnBadWords( const XP_UCHAR* word, XP_Bool isLegal,
{
XP_Bool ok = XP_TRUE;
if ( !isLegal ) {
BadWordInfo bwi;
BadWordInfo bwi = {0};
BoardCtxt* board = (BoardCtxt*)closure;
XP_S16 turn = server_getCurrentTurn( board->server );
bwi.nWords = 1;
bwi.words[0] = word;
bwi.dictName =
dict_getShortName( model_getPlayerDict( board->model, turn ) );
ok = !board->badWordRejected
&& util_warnIllegalWord( board->util, &bwi, turn, XP_FALSE );

View file

@ -82,7 +82,7 @@ typedef struct PickInfo {
typedef struct BadWordInfo {
XP_U16 nWords;
XP_UCHAR* dictName;
const XP_UCHAR* dictName;
const XP_UCHAR* words[MAX_TRAY_TILES+1]; /* can form in both directions */
} BadWordInfo;