mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
use better construction to iterate lines of a file
This commit is contained in:
parent
6fb600782f
commit
47e3a20aa8
1 changed files with 1 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue