diff --git a/xwords4/common/dictnry.c b/xwords4/common/dictnry.c index b9412521a..86be38243 100644 --- a/xwords4/common/dictnry.c +++ b/xwords4/common/dictnry.c @@ -110,7 +110,7 @@ dict_getNextTileString( const DictionaryCtxt* dict, Tile tile, } else { cur += XP_STRLEN( cur ) + 1; XP_Bool isSpecial = dict_faceIsBitmap( dict, tile ); - if ( isSpecial ) { + if ( isSpecial || tile == dict->blankTile ) { const XP_UCHAR* facep = dict_getTileStringRaw( dict, tile ); if ( cur < dict->charEnds[(XP_U16)*facep] ) { result = cur; diff --git a/xwords4/common/server.c b/xwords4/common/server.c index aebb41ab2..98e47cc39 100644 --- a/xwords4/common/server.c +++ b/xwords4/common/server.c @@ -2856,17 +2856,27 @@ server_formatDictCounts( ServerCtxt* server, XWStreamCtxt* stream, nChars = dict_numTileFaces( dict ); for ( tile = 0, nPrinted = 0; ; ) { - XP_UCHAR buf[24]; + XP_UCHAR buf[128]; XP_U16 count, value; count = dict_numTiles( dict, tile ); if ( count > 0 ) { - const XP_UCHAR* face = dict_getTileString( dict, tile ); + const XP_UCHAR* face = NULL; + XP_UCHAR faces[48] = {0}; + XP_U16 len = 0; + for ( ; ; ) { + face = dict_getNextTileString( dict, tile, face ); + if ( !face ) { + break; + } + const XP_UCHAR* fmt = len == 0? "%s" : ",%s"; + len += XP_SNPRINTF( faces + len, sizeof(faces) - len, fmt, face ); + } value = dict_getTileValue( dict, tile ); XP_SNPRINTF( buf, sizeof(buf), (XP_UCHAR*)"%s: %d/%d", - face, count, value ); + faces, count, value ); stream_catString( stream, buf ); }