summaryrefslogtreecommitdiffstats
path: root/src/Bindings/ManualBindings_Network.cpp
diff options
context:
space:
mode:
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..b5fb5b046 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;
}