diff options
author | Lee Salzman <[email protected]> | 2013-08-16 01:18:21 +0300 |
---|---|---|
committer | Lee Salzman <[email protected]> | 2013-08-16 01:18:21 +0300 |
commit | c0713c47e664341c16cb46717d6ef031e92ea085 (patch) | |
tree | 8aef3b506b52eca7d9dc23d167e9a6f040994e2e /win32.c | |
parent | 3595c0b3fb5ebf8a0f10f8d93a94fa12951073eb (diff) | |
download | enet-c0713c47e664341c16cb46717d6ef031e92ea085.tar.gz enet-c0713c47e664341c16cb46717d6ef031e92ea085.zip |
more ENET_SOCKOPT_ERROR fixes
Diffstat (limited to 'win32.c')
-rw-r--r-- | win32.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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: |