mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
fix bug using same string and code to warn and to reject phonies.
This commit is contained in:
parent
d6a161b939
commit
872ae90c94
2 changed files with 10 additions and 7 deletions
|
@ -96,7 +96,7 @@
|
||||||
{ "STRS_NEW_TILES", "New tiles: %s\n" },
|
{ "STRS_NEW_TILES", "New tiles: %s\n" },
|
||||||
{ "STRSS_TRADED_FOR", "Traded %s for %s." },
|
{ "STRSS_TRADED_FOR", "Traded %s for %s." },
|
||||||
{ "STR_PASS", "pass\n" },
|
{ "STR_PASS", "pass\n" },
|
||||||
{ "STR_PHONY_REJECTED", "Illegal word in move; turn lost!\n" },
|
{ "STR_PHONY_REJECTED", "Turn lost: illegal word in move." },
|
||||||
|
|
||||||
{ "STR_ROBOT_MOVED", "The robot made this move:\n" },
|
{ "STR_ROBOT_MOVED", "The robot made this move:\n" },
|
||||||
{ "STR_REMOTE_MOVED", "Remote player made this move:\n" },
|
{ "STR_REMOTE_MOVED", "Remote player made this move:\n" },
|
||||||
|
|
|
@ -4040,16 +4040,19 @@ palm_util_warnIllegalWord( XW_UtilCtxt* uc, BadWordInfo* bwi,
|
||||||
{
|
{
|
||||||
XP_Bool result = XP_TRUE;
|
XP_Bool result = XP_TRUE;
|
||||||
PalmAppGlobals* globals = (PalmAppGlobals*)uc->closure;
|
PalmAppGlobals* globals = (PalmAppGlobals*)uc->closure;
|
||||||
XP_UCHAR buf[200];
|
|
||||||
char wordsBuf[150];
|
const XP_UCHAR* resStr = getResString( globals,
|
||||||
const XP_UCHAR* format = getResString( globals, STR_ILLEGAL_WORD );
|
turnLost? STR_PHONY_REJECTED : STR_ILLEGAL_WORD );
|
||||||
formatBadWords( bwi, wordsBuf );
|
|
||||||
StrPrintF( (char*)buf, (const char*)format, wordsBuf );
|
|
||||||
if ( turnLost ) {
|
if ( turnLost ) {
|
||||||
keySafeCustomAlert( globals, buf );
|
keySafeCustomAlert( globals, resStr );
|
||||||
} else {
|
} else {
|
||||||
|
char wordsBuf[150];
|
||||||
|
XP_UCHAR buf[200];
|
||||||
|
formatBadWords( bwi, wordsBuf );
|
||||||
|
StrPrintF( (char*)buf, (const char*)resStr, wordsBuf );
|
||||||
result = palmask( globals, buf, NULL, -1 );
|
result = palmask( globals, buf, NULL, -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
} /* palm_util_warnIllegalWord */
|
} /* palm_util_warnIllegalWord */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue