Add cast to satisfy win7 buildbot

I really don't understand why MSVC would make the result of this computation an
int64 then complain about down-casting to an int16 when *all* of the
participating variables are int16 or smaller...

Change-Id: I2d9c27ac22b51b10e4872a6640881c8d0ec566e7
Reviewed-on: https://code.wireshark.org/review/3180
Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
Evan Huus 2014-07-23 13:41:54 -04:00
parent 057ded827d
commit ae64e09511
1 changed files with 1 additions and 1 deletions

View File

@ -272,7 +272,7 @@ static gint buffered_detect_version(const guint8 *pd)
/* if msg is '\0'-terminated, is it equal to the payload len? */
++msg_part;
msg_len = log_entry->len - (msg_part - msg_payload);
msg_len = (guint16)(log_entry->len - (msg_part - msg_payload));
msg_end = (guint8 *) memchr(msg_part, '\0', msg_len);
/* is the end of the buffer (-1) equal to the end of msg? */
if (msg_end && (msg_payload + log_entry->len - 1 != msg_end))