diff --git a/libraries/tinyblocks-editor/src/tb_editor.c b/libraries/tinyblocks-editor/src/tb_editor.c index 859a347..7c9ff5a 100644 --- a/libraries/tinyblocks-editor/src/tb_editor.c +++ b/libraries/tinyblocks-editor/src/tb_editor.c @@ -3648,6 +3648,8 @@ static void project_set_dir(const char* path) { if (!path || !path[0] || strlen(path) >= sizeof(buf)) return; strcpy(buf, path); char* slash = strrchr(buf, '/'); + char* bslash = strrchr(buf, '\\'); /* Windows usa \ */ + if (bslash && (!slash || bslash > slash)) slash = bslash; if (!slash) return; *slash = '\0'; if (buf[0]) tb_path_set_base(buf);