From 31810bb22166a3f3f64f717a7ba63b20397a3b58 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Wed, 28 Aug 2024 12:01:19 -0700 Subject: [PATCH] fix incorrect lifetime of cfg table trees --- project.4coder | 18 +++++++++--------- src/df/core/df_core.c | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/project.4coder b/project.4coder index f4a9c415..7ad1d001 100644 --- a/project.4coder +++ b/project.4coder @@ -46,9 +46,9 @@ load_paths = commands = { //- rjf: fkey command slots (change locally but do not commit) - .build_f1 = { .win = "build raddbg telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, - .build_f2 = { .win = "build rdi_from_pdb", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, - .build_f3 = { .win = "pushd build && raddbg.exe --user:local_dev.raddbg_user --project:local_dev.raddbg_project && popd", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, + .f1 = { .win = "build raddbg telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, + .f2 = { .win = "build rdi_from_pdb", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, + .f3 = { .win = "pushd build && raddbg.exe --user:local_dev.raddbg_user --project:local_dev.raddbg_project --auto_run && popd", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, //- rjf: local target builds .build_raddbg = { .win = "build raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, }, @@ -80,17 +80,17 @@ commands = fkey_command = { - .F1 = "build_f1", - .F2 = "build_f2", - .F3 = "build_f3", + .F1 = "f1", + .F2 = "f2", + .F3 = "f3", }; fkey_command_override = { .rjf = { - .F1 = "build_f1", - .F2 = "build_f2", - .F3 = "build_f3", + .F1 = "f1", + .F2 = "f2", + .F3 = "f3", }, }; diff --git a/src/df/core/df_core.c b/src/df/core/df_core.c index 222376da..36296f6c 100644 --- a/src/df/core/df_core.c +++ b/src/df/core/df_core.c @@ -408,7 +408,7 @@ df_cfg_table_push_unparsed_string(Arena *arena, DF_CfgTable *table, String8 stri DF_CfgTree *tree = push_array(arena, DF_CfgTree, 1); SLLQueuePush_NZ(&df_g_nil_cfg_tree, val->first, val->last, tree, next); tree->source = source; - tree->root = tln; + tree->root = md_tree_copy(arena, tln); } } @@ -7625,7 +7625,7 @@ df_core_begin_frame(Arena *arena, DF_CmdList *cmds, F32 dt) if(df_entity_is_nil(recent_project)) { recent_project = df_entity_alloc(df_entity_root(), DF_EntityKind_RecentProject); - df_entity_equip_name(recent_project, cfg_path); + df_entity_equip_name(recent_project, path_normalized_from_string(scratch.arena, cfg_path)); df_entity_equip_cfg_src(recent_project, DF_CfgSrc_User); } }