mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-26 10:24:14 +08:00
Steam_Apps::GetCurrentBetaName()
make sure the out buffer is null terminated
This commit is contained in:
parent
f00fdac3ac
commit
5417e0e4c2
@ -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
|
||||
|
@ -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<std::recursive_mutex> 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());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user