aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32.c
diff options
context:
space:
mode:
authorLee Salzman <[email protected]>2013-08-16 01:18:21 +0300
committerLee Salzman <[email protected]>2013-08-16 01:18:21 +0300
commitc0713c47e664341c16cb46717d6ef031e92ea085 (patch)
tree8aef3b506b52eca7d9dc23d167e9a6f040994e2e /win32.c
parent3595c0b3fb5ebf8a0f10f8d93a94fa12951073eb (diff)
downloadenet-c0713c47e664341c16cb46717d6ef031e92ea085.tar.gz
enet-c0713c47e664341c16cb46717d6ef031e92ea085.zip
more ENET_SOCKOPT_ERROR fixes
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/win32.c b/win32.c
index 13d9314..057f82c 100644
--- a/win32.c
+++ b/win32.c
@@ -204,11 +204,12 @@ enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value)
int
enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value)
{
- int result = SOCKET_ERROR;
+ int result = SOCKET_ERROR, len;
switch (option)
{
case ENET_SOCKOPT_ERROR:
- result = getsockopt (socket, SOL_SOCKET, SO_ERROR, (char *) value, sizeof (int));
+ len = sizeof(int);
+ result = getsockopt (socket, SOL_SOCKET, SO_ERROR, (char *) value, & len);
break;
default: