ip-parser: allow zeros in IP addresses.

db4
John Benediktsson 2014-02-18 07:33:54 -08:00
parent 6fd68ecb64
commit ad63d24263
1 changed files with 1 additions and 1 deletions

View File

@ -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 )