From 8f83450228e1901d16880a4c097b662445fffed4 Mon Sep 17 00:00:00 2001 From: sven Date: Tue, 7 Oct 2008 07:28:10 +0000 Subject: [PATCH] revert tonumber() conversion in stdnse.tohex() because tonumber() discards whitespace --- nselib/stdnse.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nselib/stdnse.lua b/nselib/stdnse.lua index fb65846e3..3cd87687b 100644 --- a/nselib/stdnse.lua +++ b/nselib/stdnse.lua @@ -163,7 +163,7 @@ function tohex( s, options ) local separator = options.separator local hex - if tonumber( s ) then + if type( s ) == "number" then hex = ("%x"):format(s) elseif type( s ) == 'string' then hex = ("%02x"):rep(#s):format(s:byte(1,#s))