Wireshark mailing list archives

Re: Lua converting a UINT64 to hex


From: Stig Bjørlykke <stig () bjorlykke org>
Date: Tue, 20 Nov 2012 11:08:29 +0100

On Mon, Nov 19, 2012 at 5:07 PM, Zadik, Maayan <mzadik () qti qualcomm com> wrote:
Local s = string.format("%X", data.value)

and get the following error:
bad argument #2 to 'format' (number expected, got userdata)

Just try converting data.value with tostring first, like this:

local s = string.format("%X", tostring(data.value))


-- 
Stig Bjørlykke
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: