If only part of an entry in an object fits in the object, don't report

the stuff that didn't fit as a negative number of junk bytes.

The difference between two pointers isn't guaranteed to have a
particular size; cast it to "long" and display it with "%ld".

svn path=/trunk/; revision=14821
This commit is contained in:
Guy Harris 2005-06-29 23:19:21 +00:00
parent 48e8439374
commit 324bed3029
1 changed files with 3 additions and 3 deletions

View File

@ -1530,12 +1530,12 @@ dissect_mpls_extensions(tvbuff_t *tvb, size_t offset, proto_tree *tree)
} /* end while */
if (offset != obj_end_offset)
if (offset < obj_end_offset)
proto_tree_add_text(mpls_object_tree, tvb,
offset,
obj_end_offset - offset,
"%d junk bytes",
obj_end_offset - offset);
"%ld junk bytes",
(long)(obj_end_offset - offset));
break;
default: