diff options
Diffstat (limited to 'src/libs6dns/s6dns_message_header_unpack.c')
-rw-r--r-- | src/libs6dns/s6dns_message_header_unpack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs6dns/s6dns_message_header_unpack.c b/src/libs6dns/s6dns_message_header_unpack.c index ae2b35c..8b12ca9 100644 --- a/src/libs6dns/s6dns_message_header_unpack.c +++ b/src/libs6dns/s6dns_message_header_unpack.c @@ -6,7 +6,7 @@ void s6dns_message_header_unpack (char const *s, s6dns_message_header_t *h) { uint16_unpack_big(s, &h->id) ; - h->qr = s[2] & 0x8000U ? 1 : 0 ; + h->qr = ((unsigned char *)s)[2] & 0x8000U ? 1 : 0 ; h->opcode = (s[2] >> 3) & 15 ; h->aa = s[2] & 4 ? 1 : 0 ; h->tc = s[2] & 2 ? 1 : 0 ; |