Wireshark-dev: [Wireshark-dev] Lua dissector adds trees but they have (null) in front of the tr
From: Richard Sharpe <[email protected]>
Date: Sat, 20 Oct 2018 12:25:47 -0700
Hi folks,

I have a small generated capture that has a three-byte header, with
the first being a function code and the next two being the length.

I handle them like this in Lua:

    local t_header = tree:add(buffer, label)
    t_header:add(f_function, buffer(offset, 1))
    offset = offset + 1
    t_header:add(f_length, buffer(offset, 2))
    offset = offset + 2

However, each subtree (there is another as well), appears with
'(null)' in front of it.

At first I thought maybe it was because I did not specify the length
of the buffer, so I added this at the end:

    t_header:set_len(offset - saved_offset)

However, that has not fixed the problem.

Does anyone know what I need to do to fix this?

Richard Sharpe