Skip to content
Permalink
Browse files
Zero length heredoc still crashed; ref Shopify/mruby-internal#81
  • Loading branch information
matz committed Dec 17, 2016
1 parent 5289b4b commit b0886d5692dd58bed608fe8fb2be0c017c729060
Showing 1 changed file with 6 additions and 2 deletions.
@@ -3948,8 +3948,12 @@ parse_string(parser_state *p)
}
}
if ((len-1 == hinf->term_len) && (strncmp(s, hinf->term, len-1) == 0)) {
if (c < 0) p->parsing_heredoc = NULL;
return tHEREDOC_END;
if (c < 0) {
p->parsing_heredoc = NULL;
}
else {
return tHEREDOC_END;
}
}
}
if (c < 0) {

0 comments on commit b0886d5

Please sign in to comment.