mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Strictly speaking NULL + 0 is a undefined behavior; ref #5157
This commit is contained in:
@@ -6528,8 +6528,13 @@ mrb_parse_file_continue(mrb_state *mrb, FILE *f, const void *prebuf, size_t preb
|
||||
|
||||
p = mrb_parser_new(mrb);
|
||||
if (!p) return NULL;
|
||||
p->s = (const char *)prebuf;
|
||||
p->send = (const char *)prebuf + prebufsize;
|
||||
if (prebuf) {
|
||||
p->s = (const char *)prebuf;
|
||||
p->send = (const char *)prebuf + prebufsize;
|
||||
}
|
||||
else {
|
||||
p->s = p->send = NULL;
|
||||
}
|
||||
p->f = f;
|
||||
|
||||
mrb_parser_parse(p, c);
|
||||
|
||||
+1260
-1639
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user