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/Server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Server.cpp') diff --git a/src/Server.cpp b/src/Server.cpp index 783b12947..3f61be378 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -393,8 +393,8 @@ bool cServer::Start(void) { for (auto port: m_Ports) { - UInt16 PortNum = static_cast(atoi(port.c_str())); - if (PortNum == 0) + UInt16 PortNum; + if (!StringToInteger(port, PortNum)) { LOGWARNING("Invalid port specified for server: \"%s\". Ignoring.", port.c_str()); continue; -- cgit v1.2.3