mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-bin-mirb: fix uninitialized editor struct causing bintest failures
Zero-initialize the mirb_editor struct to prevent highlight.enabled from containing garbage values when stdin is not a tty (e.g. in bintest). Without this, ANSI color codes could be emitted in non-interactive mode, breaking output string matching in tests. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -477,6 +477,8 @@ main(int argc, char **argv)
|
||||
mirb_editor editor;
|
||||
mirb_check_data check_data;
|
||||
mrb_bool use_editor = FALSE;
|
||||
|
||||
memset(&editor, 0, sizeof(editor));
|
||||
mrb_ccontext *cxt;
|
||||
struct mrb_parser_state *parser;
|
||||
mrb_state *mrb;
|
||||
|
||||
Reference in New Issue
Block a user