From f71135f796f60734f049deea462bd6da887c8dd7 Mon Sep 17 00:00:00 2001 From: batrick Date: Tue, 7 Oct 2008 02:22:17 +0000 Subject: [PATCH] Changed stdnse.tohex to no longer create tables unnecessarily if options are ommitted. --- nselib/stdnse.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nselib/stdnse.lua b/nselib/stdnse.lua index 7ad5a5c22..2354c5b49 100644 --- a/nselib/stdnse.lua +++ b/nselib/stdnse.lua @@ -9,6 +9,8 @@ local max = math.max local ceil = math.ceil local type = type +local EMPTY = {}; -- Empty constant table + module(... or "stdnse"); --- Prints debug information according with verbosity level @@ -157,7 +159,7 @@ end --@param options table specifiying formatting options --@return hexadecimal encoded string function tohex( s, options ) - options = options or {} + options = options or EMPTY local separator = options.separator local hex