diff options
Diffstat (limited to 'Sluift/component.cpp')
-rw-r--r-- | Sluift/component.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Sluift/component.cpp b/Sluift/component.cpp index f3c2e37..c1b1da4 100644 --- a/Sluift/component.cpp +++ b/Sluift/component.cpp @@ -98,3 +98,3 @@ SLUIFT_LUA_FUNCTION(Component, async_connect) { std::string host; - int port = 0; + unsigned short port = 0; if (lua_istable(L, 2)) { @@ -104,3 +104,3 @@ SLUIFT_LUA_FUNCTION(Component, async_connect) { if (boost::optional<int> portInt = Lua::getIntField(L, 2, "port")) { - port = *portInt; + port = boost::numeric_cast<unsigned short>(*portInt); } |