1
0

Replaced atoi() with StringToInteger().

This commit is contained in:
Mattes D
2015-01-25 16:25:15 +01:00
parent f243aa387c
commit 6ec5e8caa7
5 changed files with 11 additions and 9 deletions

View File

@@ -225,8 +225,8 @@ bool cHTTPServer::Start(cCallbacks & a_Callbacks, const AStringVector & a_Ports)
// Open up requested ports:
for (auto port : a_Ports)
{
UInt16 PortNum = static_cast<UInt16>(atoi(port.c_str()));
if (PortNum == 0)
UInt16 PortNum;
if (!StringToInteger(port, PortNum))
{
LOGWARNING("WebServer: Invalid port value: \"%s\". Ignoring.", port.c_str());
continue;