From 26fb318f41fca8a7f1d105a29fd6a83a705d24a3 Mon Sep 17 00:00:00 2001 From: CatWindow Date: Thu, 13 Aug 2026 15:21:31 +0300 Subject: [PATCH] windows docs path fix --- src/oneshot.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/oneshot.cpp b/src/oneshot.cpp index 894e878..00a8ecc 100644 --- a/src/oneshot.cpp +++ b/src/oneshot.cpp @@ -253,7 +253,16 @@ Oneshot::Oneshot(RGSSThreadData &threadData) : threadData(threadData){ const char* path = SDL_GetUserFolder(SDL_FOLDER_DOCUMENTS); p->docsPath = path; #ifdef windows - p->gamePath = path "\\My Games"; + const char* suffix = "\\My Games"; + + size_t len = std::strlen(path) + std::strlen(suffix) + 1; + p->gamePath = (char*)SDL_malloc(len); + + if (p->gamePath) { + std::strcpy(p->gamePath, path); + std::strcat(p->gamePath, suffix); + } + SDL_free((void*)path); #else p->gamePath = path; #endif