From 3d46bf32b85abb4d9d9a0a308c6f9504de151d7f Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Wed, 3 Mar 2021 11:28:27 -0800 Subject: [PATCH 1/2] Fix cov-1502407 (use of iterator after invalidation) --- Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp b/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp index 66829d22e8..43ddbf5fb8 100644 --- a/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp +++ b/Sources/Plasma/PubUtilLib/plAudio/plSoundEvent.cpp @@ -76,8 +76,8 @@ bool plSoundEvent::RemoveCallback( plEventCallbackMsg *msg ) if (iter != fCallbacks.cend()) { hsRefCnt_SafeUnRef( msg ); + const auto idx = iter - fCallbacks.cbegin(); fCallbacks.erase(iter); - const auto idx = std::distance(fCallbacks.cbegin(), iter); fCallbackEndingFlags.erase(fCallbackEndingFlags.cbegin() + idx); return true; } From bf691551075a98a030e3bfcddc95c3c56c37a7c9 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Wed, 3 Mar 2021 11:28:52 -0800 Subject: [PATCH 2/2] Fix spurious `%` leftover from String Theory conversion. --- Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp b/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp index d7a725880b..50162df248 100644 --- a/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp +++ b/Sources/Plasma/PubUtilLib/plNetClientComm/plNetClientComm.cpp @@ -403,7 +403,7 @@ static void INetCliAuthLoginRequestCallback ( s_account.billingType = billingType; s_players.resize(playerCount); for (unsigned i = 0; i < playerCount; ++i) { - LogMsg(kLogDebug, "Player %{}: {} explorer: {}", playerInfoArr[i].playerInt, playerInfoArr[i].playerName, playerInfoArr[i].explorer); + LogMsg(kLogDebug, "Player {}: {} explorer: {}", playerInfoArr[i].playerInt, playerInfoArr[i].playerName, playerInfoArr[i].explorer); s_players[i].playerInt = playerInfoArr[i].playerInt; s_players[i].explorer = playerInfoArr[i].explorer; s_players[i].playerName = playerInfoArr[i].playerName;