aboutsummaryrefslogtreecommitdiffstats
path: root/epan/frame_data.h
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-11-27 11:34:51 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2015-11-27 18:39:09 +0000
commit62b03da49a3e6c32f788da375faea2ca47fa2aa9 (patch)
tree7169a2968d68b9ee20db3c9cfac11207b5c7958f /epan/frame_data.h
parent946222c676dbda138fff0b437be12f8fddab5131 (diff)
Fix display of bytes as EBCDIC
MSVC compiler does not support properly setting an enum being part of a bit field. For example the following code: pinfo->fd->flags.encoding = PACKET_CHAR_ENC_CHAR_EBCDIC; changes pinfo->fd->flags.encoding from 0x0 to 0xfffffffe instead of 0x1 Let's put back an unsigned int definition (like it is in master-1.12 branch) and add explicit casts where required Bug: 11787 Change-Id: Idae0140fb6c172f1b3dbf10baefc8cfb00128f4c Reviewed-on: https://code.wireshark.org/review/12220 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/frame_data.h')
-rw-r--r--epan/frame_data.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/frame_data.h b/epan/frame_data.h
index b47093e3de..ef859d9818 100644
--- a/epan/frame_data.h
+++ b/epan/frame_data.h
@@ -75,7 +75,8 @@ typedef struct _frame_data {
struct {
unsigned int passed_dfilter : 1; /**< 1 = display, 0 = no display */
unsigned int dependent_of_displayed : 1; /**< 1 if a displayed frame depends on this frame */
- packet_char_enc encoding : 1; /**< Character encoding (ASCII, EBCDIC...) */
+ /* Do NOT use packet_char_enc enum here: MSVC compiler does not handle an enum in a bit field properly */
+ unsigned int encoding : 1; /**< Character encoding (ASCII, EBCDIC...) */
unsigned int visited : 1; /**< Has this packet been visited yet? 1=Yes,0=No*/
unsigned int marked : 1; /**< 1 = marked by user, 0 = normal */
unsigned int ref_time : 1; /**< 1 = marked as a reference time frame, 0 = normal */