diff --git a/lib/libesp32/berry/src/be_lexer.c b/lib/libesp32/berry/src/be_lexer.c index ca11141c0..7b3f05726 100644 --- a/lib/libesp32/berry/src/be_lexer.c +++ b/lib/libesp32/berry/src/be_lexer.c @@ -419,6 +419,9 @@ static btokentype scan_string(blexer *lexer) save(lexer); /* skip '\\.' */ } } + if (c == EOS) { + be_lexerror(lexer, "unfinished string"); + } c = next(lexer); /* skip '"' or '\'' */ /* check if there's an additional string literal right after */ skip_delimiter(lexer);