Skip to content

Commit

Permalink
wireshark: handle empty of_octets_t
Browse files Browse the repository at this point in the history
  • Loading branch information
rlane committed Oct 2, 2013
1 parent 7b8eaa1 commit 4a86826
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wireshark_gen/templates/_oftype_readers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ function read_uint64_t(reader, version, subtree, field_name)
end

function read_of_octets_t(reader, version, subtree, field_name)
subtree:add(fields[field_name], reader.read_all())
if not reader.is_empty() then
subtree:add(fields[field_name], reader.read_all())
end
end

function read_list_of_hello_elem_t(reader, version, subtree, field_name)
Expand Down

0 comments on commit 4a86826

Please sign in to comment.