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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user