| Summary: | incorrect error checking for accept() | ||
|---|---|---|---|
| Product: | SDL_net | Reporter: | Ivan <igagis> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | 1.2.7 | ||
| Hardware: | x86 | ||
| OS: | Windows (XP) | ||
This is in for the next release, thanks! |
in case of error the accept() function returns INVALID_SOCKET, not SOCKET_ERROR. Please change the error checking in file SDLnetTCP.cpp, line 844. if ( sock->channel == SOCKET_ERROR ) { should be changed to if ( sock->channel == INVALID_SOCKET ) {