mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Zero length heredoc still crashed; ref Shopify/mruby-internal#81
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user