summaryrefslogtreecommitdiffstats
path: root/src/HTTPServer/HTTPServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/HTTPServer/HTTPServer.cpp')
-rw-r--r--src/HTTPServer/HTTPServer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HTTPServer/HTTPServer.cpp b/src/HTTPServer/HTTPServer.cpp
index 3bcf0783a..71f974a97 100644
--- a/src/HTTPServer/HTTPServer.cpp
+++ b/src/HTTPServer/HTTPServer.cpp
@@ -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;