mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix
This commit is contained in:
parent
2d1c69ee7e
commit
6eda819011
3 changed files with 4 additions and 4 deletions
|
|
@ -33,8 +33,7 @@ static int l_tostring(lua::State* L) {
|
|||
lua::pop(L);
|
||||
return lua::pushlstring(L, buffer.data(), size);
|
||||
} else {
|
||||
lua::bytearray_as_string(L, 1);
|
||||
return 1;
|
||||
return lua::pushlstring(L, lua::bytearray_as_string(L, 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -773,7 +773,7 @@ namespace lua {
|
|||
lua::pushvalue(L, -2);
|
||||
lua::call(L, 1, 1);
|
||||
auto view = lua::tolstring(L, -1);
|
||||
lua::pop(L);
|
||||
lua::pop(L, 2);
|
||||
return view;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -696,7 +696,8 @@ public:
|
|||
while (open) {
|
||||
int size = recv(descriptor, buffer.data(), buffer.size(), 0);
|
||||
if (size <= 0) {
|
||||
logger.error() <<id <<"udp connection " << id << handle_socket_error(" recv error").what();
|
||||
logger.error() << "udp connection " << id
|
||||
<< handle_socket_error(" recv error").what();
|
||||
if (!open) break;
|
||||
closesocket(descriptor);
|
||||
state = ConnectionState::CLOSED;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue