mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +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 )
|
||||
{
|
||||
ASSERT_INITED( iter );
|
||||
XP_S16 offset = findStartsWithTiles( iter, prefix, len );
|
||||
if ( 0 > offset ) {
|
||||
/* not found; do nothing */
|
||||
} else if ( 0 == offset ) {
|
||||
if ( !firstWord( iter ) ) {
|
||||
offset = -1;
|
||||
}
|
||||
} else {
|
||||
XP_S16 result = -1;
|
||||
|
||||
if ( findStartsWithTiles( iter, prefix, len ) ) {
|
||||
XP_UCHAR buf[32];
|
||||
XP_U16 offset = dict_tilesToString( iter->dict, prefix,
|
||||
len, buf, VSIZE(buf), NULL );
|
||||
if ( ACCEPT_ITER( iter, iter->nEdges ) || nextWord( iter ) ) {
|
||||
DictPosition result = figurePosition( iter );
|
||||
iter->position = result;
|
||||
} else {
|
||||
offset = -1;
|
||||
iter->position = figurePosition( iter );
|
||||
result = offset;
|
||||
}
|
||||
}
|
||||
return offset;
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue