summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2014-02-05 20:13:52 +0000
committerkr.angelov <kr.angelov@gmail.com>2014-02-05 20:13:52 +0000
commitf23bcb8a470968ed0a9744c496280bd28dba7e37 (patch)
tree9bf9e8e95147ae9fff4c74f9530a3837e9cc1a34 /src/runtime/c/pgf
parentedeb094cf5dcde5d444adf2cdbd72a86f8aade2c (diff)
bugfix in the recognizer for literals in the C runtime
Diffstat (limited to 'src/runtime/c/pgf')
-rw-r--r--src/runtime/c/pgf/literals.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/c/pgf/literals.c b/src/runtime/c/pgf/literals.c
index 2043dd24c..89ddfdaf2 100644
--- a/src/runtime/c/pgf/literals.c
+++ b/src/runtime/c/pgf/literals.c
@@ -19,7 +19,7 @@ pgf_match_string_lit(PgfConcr* concr, PgfSymbol* psym, size_t lin_idx,
gu_assert(lin_idx == 0);
size_t offset = *poffset;
- while (!gu_is_space(sentence[offset]))
+ while (sentence[offset] && !gu_is_space(sentence[offset]))
offset++;
size_t len = offset - *poffset;
@@ -61,7 +61,7 @@ pgf_match_int_lit(PgfConcr* concr, PgfSymbol* psym, size_t lin_idx,
gu_assert(lin_idx == 0);
size_t offset = *poffset;
- while (!gu_is_space(sentence[offset]))
+ while (sentence[offset] && !gu_is_space(sentence[offset]))
offset++;
size_t len = offset - *poffset;
@@ -108,7 +108,7 @@ pgf_match_float_lit(PgfConcr* concr, PgfSymbol* psym, size_t lin_idx,
gu_assert(lin_idx == 0);
size_t offset = *poffset;
- while (!gu_is_space(sentence[offset]))
+ while (sentence[offset] && !gu_is_space(sentence[offset]))
offset++;
size_t len = offset - *poffset;