summaryrefslogtreecommitdiffstats
path: root/src/HTTPServer/HTTPServer.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-01-25 16:25:15 +0100
committerMattes D <github@xoft.cz>2015-01-27 14:53:32 +0100
commit6ec5e8caa77829d7ea3593b08f1f91244d027601 (patch)
treed5dafdb9e99e4648d0b257e34d23546a48e77bca /src/HTTPServer/HTTPServer.cpp
parentRemoved ListenThread and SocketThreads. (diff)
downloadcuberite-6ec5e8caa77829d7ea3593b08f1f91244d027601.tar
cuberite-6ec5e8caa77829d7ea3593b08f1f91244d027601.tar.gz
cuberite-6ec5e8caa77829d7ea3593b08f1f91244d027601.tar.bz2
cuberite-6ec5e8caa77829d7ea3593b08f1f91244d027601.tar.lz
cuberite-6ec5e8caa77829d7ea3593b08f1f91244d027601.tar.xz
cuberite-6ec5e8caa77829d7ea3593b08f1f91244d027601.tar.zst
cuberite-6ec5e8caa77829d7ea3593b08f1f91244d027601.zip
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;