misparsing 9grid.net
This commit is contained in:
parent
50200c1893
commit
17efd16d0f
@ -688,9 +688,11 @@ parseip(char *to, char *from)
|
|||||||
p = from;
|
p = from;
|
||||||
memset(to, 0, 4);
|
memset(to, 0, 4);
|
||||||
for(i = 0; i < 4 && *p; i++){
|
for(i = 0; i < 4 && *p; i++){
|
||||||
to[i] = strtoul(p, &p, 0);
|
to[i] = strtoul(p, &p, 10);
|
||||||
if(*p == '.')
|
if(*p == '.')
|
||||||
p++;
|
p++;
|
||||||
|
if(*p != '.' && *p != 0)
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
switch(CLASS(to)){
|
switch(CLASS(to)){
|
||||||
case 0: /* class A - 1 byte net */
|
case 0: /* class A - 1 byte net */
|
||||||
|
Loading…
Reference in New Issue
Block a user