mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 10:59:02 +00:00
use better construction to iterate lines of a file
This commit is contained in:
@@ -104,13 +104,7 @@ local filltable = function(filename, table)
|
||||
return false
|
||||
end
|
||||
|
||||
while true do
|
||||
local l = file:read()
|
||||
|
||||
if not l then
|
||||
break
|
||||
end
|
||||
|
||||
for l in file:lines() do
|
||||
-- Comments takes up a whole line
|
||||
if not l:match("#!comment:") then
|
||||
table[#table + 1] = l
|
||||
|
||||
Reference in New Issue
Block a user