From 9b28ab68f21e428e3eb0569e95df55a1f005c1e0 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Mon, 28 Jul 2025 11:26:55 -0700 Subject: [PATCH] adjust open user/project path to be more robust in cases of loading corrupted data on startup --- src/raddbg/raddbg_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/raddbg/raddbg_core.c b/src/raddbg/raddbg_core.c index 206f8881..583fbf67 100644 --- a/src/raddbg/raddbg_core.c +++ b/src/raddbg/raddbg_core.c @@ -13125,7 +13125,10 @@ rd_frame(void) //- rjf: determine if the file is good B32 file_is_okay = 0; { + String8 stored_path = (kind == RD_CmdKind_OpenUser ? rd_state->user_path : rd_state->project_path); file_is_okay = ((file_props.size == 0 && file_props.created == 0) || + str8_match(file_path, stored_path, 0) || + stored_path.size == 0 || str8_match(str8_prefix(file_data, 9), str8_lit("// raddbg"), 0)); }