summaryrefslogtreecommitdiff
path: root/thirdparty/enet
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/enet')
-rw-r--r--thirdparty/enet/godot.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/thirdparty/enet/godot.cpp b/thirdparty/enet/godot.cpp
index 7813b70286..177848f96b 100644
--- a/thirdparty/enet/godot.cpp
+++ b/thirdparty/enet/godot.cpp
@@ -168,8 +168,9 @@ int enet_socket_receive(ENetSocket socket, ENetAddress *address, ENetBuffer *buf
PacketPeerUDP *sock = (PacketPeerUDP *)socket;
- if (sock->get_available_packet_count() == 0) {
- return 0;
+ int pc = sock->get_available_packet_count();
+ if (pc < 1) {
+ return pc;
}
const uint8_t *buffer;