more ENET_SOCKOPT_ERROR fixes

This commit is contained in:
Lee Salzman
2013-08-16 01:18:21 +03:00
parent 3595c0b3fb
commit c0713c47e6
2 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -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: