Wiznet / W7500x_StdPeriph_Lib

Standard peripherals library for the W7500x
https://www.wiznet.io/
17 stars 5 forks source link

socket number check is not working #11

Closed edwin-oetelaar closed 5 years ago

edwin-oetelaar commented 5 years ago
#define CHECK_SOCKNUM()   \
    do{                    \
        if(sn > _WIZCHIP_SOCK_NUM_) return SOCKERR_SOCKNUM;   \
    }while(0);             \

I think you want this : > and >= off by one error

#define CHECK_SOCKNUM()   \
    do{                    \
        if(sn >= _WIZCHIP_SOCK_NUM_) return SOCKERR_SOCKNUM;   \
    }while(0);             \
bjnhur commented 5 years ago

Thanks, fixed. b672a2d