1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 20:29:03 +00:00

Lua 5.2 fixed from Daniel Miller.

http://seclists.org/nmap-dev/2012/q2/525
This commit is contained in:
david
2012-05-29 20:11:39 +00:00
parent a04314beaa
commit aa6717eb1f
18 changed files with 36 additions and 34 deletions

View File

@@ -505,20 +505,20 @@ local GeoIP = {
start_pos = start_pos + 1
local end_pos = 0
end_pos = record_buf:find("%z",start_pos)
end_pos = record_buf:find("\0",start_pos)
if start_pos ~= end_pos then
record.region_name = record_buf:sub(start_pos, end_pos-1)
end
start_pos = end_pos + 1
end_pos = record_buf:find("%z",start_pos)
end_pos = record_buf:find("\0",start_pos)
if start_pos ~= end_pos then
record.city = record_buf:sub(start_pos, end_pos-1)
end
start_pos = end_pos + 1
end_pos = record_buf:find("%z",start_pos)
end_pos = record_buf:find("\0",start_pos)
if start_pos ~= end_pos then
record.postal_code = record_buf:sub(start_pos, end_pos-1)
end