From 958ba6942243dbbd35a65c0b3c45dc0d8a172404 Mon Sep 17 00:00:00 2001 From: ron Date: Wed, 13 Jan 2010 21:18:36 +0000 Subject: [PATCH] fixed another bug in format_output(), thanks to Patrik. --- nselib/stdnse.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nselib/stdnse.lua b/nselib/stdnse.lua index 29f0aabaa..ad2598db8 100644 --- a/nselib/stdnse.lua +++ b/nselib/stdnse.lua @@ -417,8 +417,8 @@ function format_output(status, data, indent) return "" end - -- Return a single line of output as-is - if(indent == nil and #data == 1 and not(data['name']) and not(data['warning'])) then + -- Return a single line of output as-is (assuming it's top-level and a string) + if(indent == nil and #data == 1 and type(data) == 'string' and not(data['name']) and not(data['warning'])) then return data[1] end