diff options
author | Mattes D <github@xoft.cz> | 2015-01-25 16:25:15 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-01-27 14:53:32 +0100 |
commit | 6ec5e8caa77829d7ea3593b08f1f91244d027601 (patch) | |
tree | d5dafdb9e99e4648d0b257e34d23546a48e77bca /src/RCONServer.cpp | |
parent | Removed ListenThread and SocketThreads. (diff) | |
download | cuberite-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/RCONServer.cpp')
-rw-r--r-- | src/RCONServer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<UInt16>(atol(port.c_str())); - if (PortNum == 0) + UInt16 PortNum; + if (!StringToInteger(port, PortNum)) { LOGINFO("Invalid RCON port value: \"%s\". Ignoring.", port.c_str()); continue; |