Nb is an unsigned value; treat it as such.

Use proto_tree_add_item_ret_uint() to get its value, while we're at it.

Change-Id: I734da5f588d9a89e810490d657c09b9ad2ff08dd
Reviewed-on: https://code.wireshark.org/review/26841
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2018-04-09 22:16:28 -07:00
parent 2c7b678d7e
commit bbd0142887
1 changed files with 2 additions and 3 deletions

View File

@ -1092,7 +1092,7 @@ gint WrethMailDissection(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, prot
{
proto_item *mi;
proto_tree *pWrethMailboxTree;
gint Nb = 0;
guint32 Nb = 0;
guint16 Codef = 0;
mi = proto_tree_add_protocol_format(pWrethTree, wreth_proto, tvb, Offset, -1, "MailBox");
@ -1144,8 +1144,7 @@ gint WrethMailDissection(tvbuff_t *tvb, guint8 Offset, packet_info * pInfo, prot
proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Nes, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
Offset += 2;
/*Mail Nb*/
Nb = (gint)tvb_get_letohs(tvb,Offset);
proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_Nb, tvb, Offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item_ret_uint(pWrethMailboxTree, hf_Wreth_Mail_Nb, tvb, Offset, 2, ENC_LITTLE_ENDIAN, &Nb);
Offset += 2;
/*Mail TypVar*/
proto_tree_add_item(pWrethMailboxTree, hf_Wreth_Mail_TypVar, tvb, Offset, 2, ENC_LITTLE_ENDIAN);