From badfcb6e3f3af10e8e16951b21424cbdf3ef93fe Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Wed, 8 Jul 2015 17:32:06 +0100 Subject: [PATCH] Fix uninitialised variable use in GS title bar When the GS plugin is suspended and resumed, PCSX2 will set GS frame title using an uninitialised array, making it prone to crashing in those situations. Initialise the array. --- pcsx2/gui/FrameForGS.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcsx2/gui/FrameForGS.cpp b/pcsx2/gui/FrameForGS.cpp index b6bfcdd24a..c6b16d156b 100644 --- a/pcsx2/gui/FrameForGS.cpp +++ b/pcsx2/gui/FrameForGS.cpp @@ -558,6 +558,7 @@ void GSFrame::OnUpdateTitle( wxTimerEvent& evt ) double fps = wxGetApp().FpsManager.GetFramerate(); char gsDest[128]; + gsDest[0] = 0; // No need to set whole array to NULL. GSgetTitleInfo2( gsDest, sizeof(gsDest) ); const wxChar* limiterStr = L"None";