diff --git a/src/WindowsPortableUpdater.cpp b/src/WindowsPortableUpdater.cpp index 90318a0..ac4ea01 100644 --- a/src/WindowsPortableUpdater.cpp +++ b/src/WindowsPortableUpdater.cpp @@ -9,6 +9,7 @@ #ifdef _WIN32 #include #include +#include #endif namespace WindowsPortableUpdater { @@ -86,11 +87,11 @@ bool apply_zip_and_restart(const std::string& zipBytes) { #ifdef _WIN32 namespace fs = std::filesystem; try { - char* basePath = SDL_GetBasePath(); + const char* basePath = SDL_GetBasePath(); if(!basePath) return false; fs::path appDir = fs::path(basePath); - SDL_free(basePath); + SDL_free(const_cast(basePath)); fs::path tempRoot = fs::temp_directory_path() / "infinipaint-update"; fs::create_directories(tempRoot);