mirror of
https://github.com/0intro/conterm
synced 2024-11-22 05:41:28 +03:00
misparsing 9grid.net
This commit is contained in:
parent
17efd16d0f
commit
af11a9e129
@ -689,10 +689,12 @@ parseip(char *to, char *from)
|
||||
memset(to, 0, 4);
|
||||
for(i = 0; i < 4 && *p; i++){
|
||||
to[i] = strtoul(p, &p, 10);
|
||||
if(*p != '.' && *p != 0){
|
||||
memset(to, 0, 4);
|
||||
return 0;
|
||||
}
|
||||
if(*p == '.')
|
||||
p++;
|
||||
if(*p != '.' && *p != 0)
|
||||
return 0;
|
||||
}
|
||||
switch(CLASS(to)){
|
||||
case 0: /* class A - 1 byte net */
|
||||
|
Loading…
Reference in New Issue
Block a user