Make guy's fix in revision 37236 actually work:

"You cannot just make the "len" field of a GByteArray larger, if there's
no data to back that length; you can only make it smaller."

Two equal values are always equal!

This fixes bug 5941.

svn path=/trunk/; revision=37783
This commit is contained in:
Stig Bjørlykke 2011-06-25 14:58:06 +00:00
parent eaa3542ae7
commit 7491b68a3a
1 changed files with 1 additions and 1 deletions

View File

@ -4112,7 +4112,7 @@ proto_item_set_len(proto_item *pi, const gint length)
* larger, if there's no data to back that length;
* you can only make it smaller.
*/
if (fi->value.ftype->ftype == FT_BYTES && length <= fi->length)
if (fi->value.ftype->ftype == FT_BYTES && length <= (gint)fi->value.value.bytes->len)
fi->value.value.bytes->len = length;
}