aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-isobus-vt.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-05-26 11:43:07 -0700
committerGuy Harris <guy@alum.mit.edu>2019-05-26 18:43:53 +0000
commit38dec96c656e438e1f09f7dda6327b85ffd0c479 (patch)
tree73dc2869e6f435776513653fa4309f77941d9b86 /epan/dissectors/packet-isobus-vt.c
parenta3481933f9719b053f3178c3da6fc3af2d9f5c53 (diff)
*Always* pair ENC_UTF_16 and ENC_UCS_2 with a byte order.
Big-endian and little-endian UTF-16 and UCS-2 aren't the same; always associate them with a byte order ENC_ flag, to clarify what byte order is being used. Yes, for big-endian, omitting the ENC_ flag, or using ENC_NA, *happens* to work, because ENC_BIG_ENDIAN and ENC_NA *happen* to be 0, but omitting ENC_BIG_ENDIAN doesn't make it sufficiently clear that it's UTF-16BE or UCS-2BE. Change-Id: Iecf7375763ce4922bd1b0676c9dc5a01731c2fec Reviewed-on: https://code.wireshark.org/review/33374 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-isobus-vt.c')
-rw-r--r--epan/dissectors/packet-isobus-vt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-isobus-vt.c b/epan/dissectors/packet-isobus-vt.c
index 4749c318b7..382b249da4 100644
--- a/epan/dissectors/packet-isobus-vt.c
+++ b/epan/dissectors/packet-isobus-vt.c
@@ -1107,7 +1107,7 @@ dissect_vt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, enum vt_directio
firstTwoBytesString = tvb_get_letohs(tvb,offset);
if(firstTwoBytesString == 0xFEFF)
{
- encoding = ENC_UCS_2;
+ encoding = ENC_UCS_2|ENC_BIG_ENDIAN;
bomOffset = 2;
}
@@ -2701,7 +2701,7 @@ dissect_vt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, enum vt_directio
firstTwoBytesString = tvb_get_letohs(tvb,offset);
if(firstTwoBytesString == 0xFEFF)
{
- encoding = ENC_UCS_2;
+ encoding = ENC_UCS_2|ENC_BIG_ENDIAN;
bomOffset = 2;
}
@@ -3214,7 +3214,7 @@ dissect_vt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, enum vt_directio
firstTwoBytesString = tvb_get_letohs(tvb,offset);
if(firstTwoBytesString == 0xFEFF)
{
- encoding = ENC_UCS_2;
+ encoding = ENC_UCS_2|ENC_BIG_ENDIAN;
bomOffset = 2;
}