diff --git a/xwords4/common/board.c b/xwords4/common/board.c index b9fe9dcf6..e365ea6c3 100644 --- a/xwords4/common/board.c +++ b/xwords4/common/board.c @@ -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 ); diff --git a/xwords4/common/util.h b/xwords4/common/util.h index 29c64fd3d..f9866042b 100644 --- a/xwords4/common/util.h +++ b/xwords4/common/util.h @@ -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;