// Check the maximum score, if we go over it we won't try this change.
#define TRY_DEEPER(su, stack, depth, add) \
- (depth < MAXWLEN && stack[depth].ts_score + (add) < su->su_maxscore)
+ (depth < MAXWLEN - 1 && stack[depth].ts_score + (add) < su->su_maxscore)
/*
* Try finding suggestions by adding/removing/swapping letters.
// At end of a prefix or at start of prefixtree: check for
// following word.
- if (depth < MAXWLEN
+ if (depth < MAXWLEN - 1
&& (byts[arridx] == 0 || n == (int)STATE_NOPREFIX))
{
// Set su->su_badflags to the caps type at this position.