IsIpInRange( range, ip ) can take a range in the form of "10.0.0.1-10.0.0.255".
If the end address is on a higher Class C network than the start address, and the last octet of the start or end address is greater than 1 or less than 255, then the function may return incorrect decisions. For example:
It seems that the function is only looking at the final octet on the assumption that the Class C network (i.e. the first 3 octets) is the same.