From 9f6b609e089f6b9941b2732ff3bb7b6995cb7798 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Mon, 1 Jul 2013 08:54:21 -0400 Subject: Made code more portable. --- core/network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/network.c') diff --git a/core/network.c b/core/network.c index bbc1f570..e7999416 100644 --- a/core/network.c +++ b/core/network.c @@ -70,8 +70,8 @@ int recievepacket(IP_Port * ip_port, char * data, uint32_t * length) { ADDR addr; uint32_t addrlen = sizeof(addr); - (*(int *)length) = recvfrom(sock, data, MAX_UDP_PACKET_SIZE, 0, (struct sockaddr *)&addr, &addrlen); - if(*(int *)length <= 0) + (*(int32_t *)length) = recvfrom(sock, data, MAX_UDP_PACKET_SIZE, 0, (struct sockaddr *)&addr, &addrlen); + if(*(int32_t *)length <= 0) { //nothing received //or empty packet -- cgit v1.2.3