On Jun 18, 2009, at 1:43 PM, Jonathan Walker (c) wrote: > When creating and registering a new header field array in a plug- > in, does the size of the array have to be exactly the same as the > number of used fields?
No. This is C, not PL/I :-), so if you pass an array (which really means passing a pointer to the first element of the array) to a function, the function has no idea how big the array actually is. > For example, I created a hf array as follows: > > static hf_register_info hf[MAX_FIELDS]; > > I plan to fill up a certain variable amount of fields (up to > “cur_field”) less than MAX_FIELDS, and then register the first > cur_field amount of values of the array as follows: > > proto_register_field_array(proto_shsip, hf, cur_field); > > However, I’m getting a run-time error upon trying to click a field > in Wireshark, and I was wondering if this is the problem. Probably not. What is the run-time error? ___________________________________________________________________________ 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-requ...@wireshark.org?subject=unsubscribe