diff options
| author | Thomas Hallgren <th-github@altocumulus.org> | 2019-08-21 14:33:30 +0200 |
|---|---|---|
| committer | Thomas Hallgren <th-github@altocumulus.org> | 2019-08-21 14:33:30 +0200 |
| commit | a7a592d93ed28aeb1d3243f2438685071102a302 (patch) | |
| tree | 3fdeaf7430ca3efa77420946734a225ee6c31eed /src/runtime/c/pgf/parser.c | |
| parent | d1bb1de87f1f5c1189f7a19fc712835e976957bd (diff) | |
| parent | 394d033d194df8c63eea7a0eca444168ae74844e (diff) | |
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-core
Diffstat (limited to 'src/runtime/c/pgf/parser.c')
| -rw-r--r-- | src/runtime/c/pgf/parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/c/pgf/parser.c b/src/runtime/c/pgf/parser.c index be672d571..428ec9f1e 100644 --- a/src/runtime/c/pgf/parser.c +++ b/src/runtime/c/pgf/parser.c @@ -1159,7 +1159,7 @@ pgf_parsing_scan(PgfParsing *ps) PgfParseState* state = pgf_new_parse_state(ps, 0, BIND_SOFT); - while (state != NULL) { + while (state->end_offset < len) { if (state->needs_bind) { // We have encountered two tokens without space in between. // Those can be accepted only if there is a BIND token @@ -1177,7 +1177,7 @@ pgf_parsing_scan(PgfParsing *ps) // skip one character and try again GuString s = ps->sentence+state->end_offset; gu_utf8_decode((const uint8_t**) &s); - pgf_new_parse_state(ps, ps->sentence-s, BIND_NONE); + pgf_new_parse_state(ps, s-ps->sentence, BIND_NONE); } if (state == ps->before) |
