1
0
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:
batrick
2010-12-08 14:11:48 +00:00
parent 6fb600782f
commit 47e3a20aa8

View File

@@ -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