msgpack: replace pow() with shift.
This removes all casting issues. Change-Id: I0377fe3fa31edf1e6c3f315d31dd01a728a3c173 Reviewed-on: https://code.wireshark.org/review/28852 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
This commit is contained in:
parent
4a498ae798
commit
8607026a7d
|
@ -273,7 +273,7 @@ static void dissect_msgpack_ext(tvbuff_t* tvb, proto_tree* tree, int type, void*
|
|||
if (type >= 0xd4 && type <= 0xd8) {
|
||||
proto_tree_add_item(ext_tree, hf_msgpack_ext_type, tvb, *offset, 1, ENC_NA);
|
||||
*offset += 1;
|
||||
bytes = (int)pow(2, type - 0xd4);
|
||||
bytes = 1 << (type - 0xd4);
|
||||
start = tvb_get_ptr(tvb, *offset, bytes);
|
||||
proto_tree_add_bytes(ext_tree, hf_msgpack_ext_bytes, tvb, *offset, bytes, start);
|
||||
*value = bytes_to_hexstr(*value, start, bytes);
|
||||
|
|
Loading…
Reference in New Issue