mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-07 05:24:46 +01:00
fix not indicating when no results
This commit is contained in:
parent
e7c96290ea
commit
8097a6ba0b
1 changed files with 9 additions and 13 deletions
|
@ -611,22 +611,18 @@ XP_S16
|
||||||
di_findStartsWith( DictIter* iter, const Tile* prefix, XP_U16 len )
|
di_findStartsWith( DictIter* iter, const Tile* prefix, XP_U16 len )
|
||||||
{
|
{
|
||||||
ASSERT_INITED( iter );
|
ASSERT_INITED( iter );
|
||||||
XP_S16 offset = findStartsWithTiles( iter, prefix, len );
|
XP_S16 result = -1;
|
||||||
if ( 0 > offset ) {
|
|
||||||
/* not found; do nothing */
|
if ( findStartsWithTiles( iter, prefix, len ) ) {
|
||||||
} else if ( 0 == offset ) {
|
XP_UCHAR buf[32];
|
||||||
if ( !firstWord( iter ) ) {
|
XP_U16 offset = dict_tilesToString( iter->dict, prefix,
|
||||||
offset = -1;
|
len, buf, VSIZE(buf), NULL );
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ( ACCEPT_ITER( iter, iter->nEdges ) || nextWord( iter ) ) {
|
if ( ACCEPT_ITER( iter, iter->nEdges ) || nextWord( iter ) ) {
|
||||||
DictPosition result = figurePosition( iter );
|
iter->position = figurePosition( iter );
|
||||||
iter->position = result;
|
result = offset;
|
||||||
} else {
|
|
||||||
offset = -1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return offset;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue