Fix incorrect comparison in get_socket().

Spotted by Frederic Bernon.
This commit is contained in:
jifl 2007-02-26 20:16:38 +00:00
parent 1d22294974
commit 75beb3bd35

View File

@ -118,7 +118,7 @@ get_socket(int s)
{
struct lwip_socket *sock;
if ((s < 0) || (s > NUM_SOCKETS)) {
if ((s < 0) || (s >= NUM_SOCKETS)) {
LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): invalid\n", s));
set_errno(EBADF);
return NULL;