mirror of
https://github.com/lionsoul2014/ip2region.git
synced 2025-12-08 19:25:22 +00:00
empty input ignore
This commit is contained in:
parent
75893f0331
commit
7576daa6cc
@ -134,6 +134,12 @@ while ( true ) do
|
||||
break
|
||||
end
|
||||
|
||||
-- empty string ignore
|
||||
line = line:gsub("^%s*(.-)%s*$", "%1")
|
||||
if string.len(line) < 1 then
|
||||
goto continue
|
||||
end
|
||||
|
||||
ip_bytes, err = xdb.parse_ip(line)
|
||||
-- print(string.format("parse(%s): %s, err: %s", line, xdb.ip_to_string(ip_bytes), err))
|
||||
if err ~= nil then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user