diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ce199ed..80884fba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ * **[bitsynth]** Fix Age of Empires 2: Definitive Edition, the game expects the app itself to be an owned DLC otherwise most options will be disabled +* `Steam_Apps::GetCurrentBetaName()` make sure the out buffer is null terminated + --- # 2024/3/16 diff --git a/dll/steam_apps.cpp b/dll/steam_apps.cpp index 05e9b734..de632fb8 100644 --- a/dll/steam_apps.cpp +++ b/dll/steam_apps.cpp @@ -232,9 +232,10 @@ void Steam_Apps::RequestAppProofOfPurchaseKey( AppId_t nAppID ) // https://partner.steamgames.com/doc/api/ISteamApps bool Steam_Apps::GetCurrentBetaName( char *pchName, int cchNameBufferSize ) { - PRINT_DEBUG("Steam_Apps::GetCurrentBetaName %i\n", cchNameBufferSize); + PRINT_DEBUG("Steam_Apps::GetCurrentBetaName %p [%i]\n", pchName, cchNameBufferSize); std::lock_guard lock(global_mutex); if (pchName && cchNameBufferSize > settings->current_branch_name.size()) { + memset(pchName, 0, cchNameBufferSize); memcpy(pchName, settings->current_branch_name.c_str(), settings->current_branch_name.size()); }