From d033150d0a998feca47894deb29dc04db3a62dfb Mon Sep 17 00:00:00 2001 From: Dmitry Tsarevich Date: Fri, 3 Jan 2025 03:48:22 +0300 Subject: [PATCH] [adminserver] Initialize class members in ctor --- tracker/AdminServer/GraphPanel.cpp | 3 +++ tracker/AdminServer/TokenLine.cpp | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tracker/AdminServer/GraphPanel.cpp b/tracker/AdminServer/GraphPanel.cpp index a2d1f566d..f76145d25 100644 --- a/tracker/AdminServer/GraphPanel.cpp +++ b/tracker/AdminServer/GraphPanel.cpp @@ -416,7 +416,10 @@ void CGraphPanel::CGraphsImage::Paint() //----------------------------------------------------------------------------- CGraphPanel::CGraphsImage::CGraphsImage(): vgui::Image(), points() { + x = y = -1; maxIn=maxOut=minIn=minOut=minFPS=maxFPS=minPing=maxPing=0; + maxPlayers = minPlayers = 0; + timeBetween = SECONDS; net_i=net_o=fps=cpu=ping=players=false; numAvgs=0; memset(&avgPoint,0x0,sizeof(Points_t)); diff --git a/tracker/AdminServer/TokenLine.cpp b/tracker/AdminServer/TokenLine.cpp index c0999b2ff..9fef7c570 100644 --- a/tracker/AdminServer/TokenLine.cpp +++ b/tracker/AdminServer/TokenLine.cpp @@ -141,10 +141,14 @@ char* TokenLine::GetRestOfLine(int i) TokenLine::TokenLine(char * string) { + memset(m_token, 0, sizeof(m_token)); SetLine(string); } TokenLine::TokenLine() { - + memset(m_tokenBuffer, 0, sizeof(m_tokenBuffer)); + memset(m_fullLine, 0, sizeof(m_fullLine)); + memset(m_token, 0, sizeof(m_token)); + m_tokenNumber = 0; }