From 126d5e027843482a0b51ef81f93082aa79e29e11 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Wed, 13 Nov 2013 15:15:28 +0000 Subject: [PATCH] bugfix in the C runtime which had made the parser up to 200 times slower for some sentences --- src/runtime/c/pgf/parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/c/pgf/parser.c b/src/runtime/c/pgf/parser.c index 66d77175d..d8d8d5fef 100644 --- a/src/runtime/c/pgf/parser.c +++ b/src/runtime/c/pgf/parser.c @@ -1247,9 +1247,9 @@ pgf_new_parse_state(PgfParsing* ps, size_t start_offset, BIND_TYPE bind_type) pstate = &ps->after; while (*pstate != NULL) { if (bind_type != BIND_NONE) { - if (ps->before->start_offset == start_offset && - ps->before->end_offset == start_offset && - !ps->before->needs_bind) + if ((*pstate)->start_offset == start_offset && + (*pstate)->end_offset == start_offset && + !(*pstate)->needs_bind) return ps->before; } else { if ((*pstate)->start_offset == start_offset)