mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
fix bug: include wordlist name in bad word info passed into util function
This commit is contained in:
parent
ad2b925a60
commit
78670e9650
2 changed files with 4 additions and 2 deletions
|
@ -743,12 +743,14 @@ warnBadWords( const XP_UCHAR* word, XP_Bool isLegal,
|
||||||
{
|
{
|
||||||
XP_Bool ok = XP_TRUE;
|
XP_Bool ok = XP_TRUE;
|
||||||
if ( !isLegal ) {
|
if ( !isLegal ) {
|
||||||
BadWordInfo bwi;
|
BadWordInfo bwi = {0};
|
||||||
BoardCtxt* board = (BoardCtxt*)closure;
|
BoardCtxt* board = (BoardCtxt*)closure;
|
||||||
XP_S16 turn = server_getCurrentTurn( board->server );
|
XP_S16 turn = server_getCurrentTurn( board->server );
|
||||||
|
|
||||||
bwi.nWords = 1;
|
bwi.nWords = 1;
|
||||||
bwi.words[0] = word;
|
bwi.words[0] = word;
|
||||||
|
bwi.dictName =
|
||||||
|
dict_getShortName( model_getPlayerDict( board->model, turn ) );
|
||||||
|
|
||||||
ok = !board->badWordRejected
|
ok = !board->badWordRejected
|
||||||
&& util_warnIllegalWord( board->util, &bwi, turn, XP_FALSE );
|
&& util_warnIllegalWord( board->util, &bwi, turn, XP_FALSE );
|
||||||
|
|
|
@ -82,7 +82,7 @@ typedef struct PickInfo {
|
||||||
|
|
||||||
typedef struct BadWordInfo {
|
typedef struct BadWordInfo {
|
||||||
XP_U16 nWords;
|
XP_U16 nWords;
|
||||||
XP_UCHAR* dictName;
|
const XP_UCHAR* dictName;
|
||||||
const XP_UCHAR* words[MAX_TRAY_TILES+1]; /* can form in both directions */
|
const XP_UCHAR* words[MAX_TRAY_TILES+1]; /* can form in both directions */
|
||||||
} BadWordInfo;
|
} BadWordInfo;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue