aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-04-13 20:53:41 -0400
committerJesse Luehrs <doy@tozt.net>2014-04-13 20:53:41 -0400
commitc9ebd2a26f54551cb4219f645d8657f38728489c (patch)
treeb029564a47933497cde2ecfa3af2e654800a48d0
parent58e48dd139cf34f64bdcfda2b559378df1ba04ca (diff)
downloadrunes-c9ebd2a26f54551cb4219f645d8657f38728489c.tar.gz
runes-c9ebd2a26f54551cb4219f645d8657f38728489c.zip
regen
-rw-r--r--parser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/parser.c b/parser.c
index e10c2e1..d1be71e 100644
--- a/parser.c
+++ b/parser.c
@@ -2108,6 +2108,9 @@ void runes_parser_process_string(RunesTerm *t, char *buf, size_t len)
YY_BUFFER_STATE state;
yyscan_t scanner;
+ /* XXX this will break if buf ends with a partial escape sequence or utf8
+ * character. we need to detect that and not consume the entire input in
+ * that case */
runes_parser_yylex_init_extra(t,&scanner);
state = runes_parser_yy_scan_bytes(buf, len, scanner);
runes_parser_yylex(scanner);