summaryrefslogtreecommitdiffstats
path: root/src/Bindings/ManualBindings_Network.cpp
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-19 16:25:18 +0200
committertycho <work.tycho@gmail.com>2015-05-19 18:09:05 +0200
commit480052c058f3a8ebc70f024933ba5deb6baf0b08 (patch)
tree139f97344eb2f10201021b0cb3f582a7a024d9ec /src/Bindings/ManualBindings_Network.cpp
parentFixed some more warnings (diff)
downloadcuberite-480052c058f3a8ebc70f024933ba5deb6baf0b08.tar
cuberite-480052c058f3a8ebc70f024933ba5deb6baf0b08.tar.gz
cuberite-480052c058f3a8ebc70f024933ba5deb6baf0b08.tar.bz2
cuberite-480052c058f3a8ebc70f024933ba5deb6baf0b08.tar.lz
cuberite-480052c058f3a8ebc70f024933ba5deb6baf0b08.tar.xz
cuberite-480052c058f3a8ebc70f024933ba5deb6baf0b08.tar.zst
cuberite-480052c058f3a8ebc70f024933ba5deb6baf0b08.zip
Diffstat (limited to 'src/Bindings/ManualBindings_Network.cpp')
-rw-r--r--src/Bindings/ManualBindings_Network.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Bindings/ManualBindings_Network.cpp b/src/Bindings/ManualBindings_Network.cpp
index df97d60b3..7d6ff95a7 100644
--- a/src/Bindings/ManualBindings_Network.cpp
+++ b/src/Bindings/ManualBindings_Network.cpp
@@ -101,13 +101,12 @@ static int tolua_cNetwork_CreateUDPEndpoint(lua_State * L)
}
// Read the params:
- int Port;
- S.GetStackValues(2, Port);
+ UInt16 Port;
// Check validity:
- if ((Port < 0) || (Port > 65535))
+ if (S.GetStackValues(2, Port))
{
- LOGWARNING("cNetwork:CreateUDPEndpoint() called with invalid port (%d), failing the request.", Port);
+ LOGWARNING("cNetwork:CreateUDPEndpoint() called with invalid port, failing the request.");
S.Push(false);
return 1;
}