ip-parser: allow zeros in IP addresses.
parent
6fd68ecb64
commit
ad63d24263
|
@ -10,7 +10,7 @@ ERROR: invalid-ipv4 str ;
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
: cleanup-octal ( str -- str )
|
: cleanup-octal ( str -- str )
|
||||||
dup { [ "0" head? ] [ "0x" head? not ] } 1&&
|
dup { [ "0" = not ] [ "0" head? ] [ "0x" head? not ] } 1&&
|
||||||
[ rest "0o" prepend ] when ;
|
[ rest "0o" prepend ] when ;
|
||||||
|
|
||||||
: split-components ( str -- array )
|
: split-components ( str -- array )
|
||||||
|
|
Loading…
Reference in New Issue