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?

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Reply via email to