From afe98e8d8001c9857809c1409090ae9e0a69d51b Mon Sep 17 00:00:00 2001 From: djalal Date: Tue, 14 Dec 2010 10:20:23 +0000 Subject: [PATCH] Fix a bug that was causing the read_from_file() to not return the correct file lines. --- nselib/datafiles.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nselib/datafiles.lua b/nselib/datafiles.lua index bcb114e31..7b1b950ac 100644 --- a/nselib/datafiles.lua +++ b/nselib/datafiles.lua @@ -245,8 +245,8 @@ function read_from_file( file ) return false, ( "Error in datafiles.read_from_file: Cannot open %s for reading: %s" ):format( filepath, err ) end - local line, ret = nil, {} - for l in f:lines() do + local ret = {} + for line in f:lines() do ret[#ret+1] = line end