fix in the dictionary lookup

This commit is contained in:
krasimir
2015-05-08 18:12:24 +00:00
parent b87ed432a5
commit 7ee9edd080

View File

@@ -1079,7 +1079,7 @@ pgf_symbols_cmp(GuString* psent, BIND_TYPE* pbind, PgfSymbols* syms)
static void static void
pgf_parsing_lookahead(PgfParsing *ps, PgfParseState* state, pgf_parsing_lookahead(PgfParsing *ps, PgfParseState* state,
size_t i, size_t j, ptrdiff_t min, ptrdiff_t max) int i, int j, ptrdiff_t min, ptrdiff_t max)
{ {
// This is a variation of a binary search algorithm which // This is a variation of a binary search algorithm which
// can retrieve all prefixes of a string with minimal // can retrieve all prefixes of a string with minimal
@@ -1087,7 +1087,7 @@ pgf_parsing_lookahead(PgfParsing *ps, PgfParseState* state,
// prefix separately. // prefix separately.
while (i <= j) { while (i <= j) {
size_t k = (i+j) / 2; int k = (i+j) / 2;
PgfSequence* seq = gu_seq_index(ps->concr->sequences, PgfSequence, k); PgfSequence* seq = gu_seq_index(ps->concr->sequences, PgfSequence, k);
GuString start = ps->sentence + state->end_offset; GuString start = ps->sentence + state->end_offset;