Changeset

2967:c39ad633b26d

net.server: Fix logic error causing traceback when receiving a non-number port
author Matthew Wild <mwild1@gmail.com>
date Fri, 09 Apr 2010 12:25:54 +0100
parents 2960:de405832bfb6
children 2968:fdd049a4e551 2979:b1726c2a2afc
files net/server.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/server.lua	Sat Apr 03 22:26:14 2010 +0100
+++ b/net/server.lua	Fri Apr 09 12:25:54 2010 +0100
@@ -698,7 +698,7 @@
     if type( listeners ) ~= "table" then
         err = "invalid listener table"
     end
-    if not type( port ) == "number" or not ( port >= 0 and port <= 65535 ) then
+    if type( port ) ~= "number" or not ( port >= 0 and port <= 65535 ) then
         err = "invalid port"
     elseif _server[ port ] then
         err =  "listeners on port '" .. port .. "' already exist"