From 6ec5e8caa77829d7ea3593b08f1f91244d027601 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 25 Jan 2015 16:25:15 +0100 Subject: Replaced atoi() with StringToInteger(). --- src/RCONServer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/RCONServer.cpp') diff --git a/src/RCONServer.cpp b/src/RCONServer.cpp index 63bc97fe3..cd8409367 100644 --- a/src/RCONServer.cpp +++ b/src/RCONServer.cpp @@ -155,8 +155,8 @@ void cRCONServer::Initialize(cIniFile & a_IniFile) // Start listening on each specified port: for (auto port: Ports) { - UInt16 PortNum = static_cast(atol(port.c_str())); - if (PortNum == 0) + UInt16 PortNum; + if (!StringToInteger(port, PortNum)) { LOGINFO("Invalid RCON port value: \"%s\". Ignoring.", port.c_str()); continue; -- cgit v1.2.3