From 207d8c20789a76eccf8801cbeef9fc590d42c3c7 Mon Sep 17 00:00:00 2001 From: mguinhos Date: Fri, 30 Oct 2026 01:25:48 -0300 Subject: [PATCH] Editor: pasta-base do projeto tambem com separador \ (Windows) O project_set_dir procurava so '/', entao num caminho do Windows (ex.: jogo-3d\minecraft.sb) ele nao achava a pasta: os assets relativos (carregue o PNG, etc.) abriam com o caminho errado e davam "libpng: No such file or directory". Agora aceita '\' tambem. Achado testando o build de Windows 2000 na VM real (QEMU). Co-Authored-By: Claude Opus 5 --- libraries/tinyblocks-editor/src/tb_editor.c | 2 ++ 1 file changed, 2 insertions(+) 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);