From 66232b481862c2ad5fc66ec35b6be68c7bf4d277 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 30 Jan 2017 18:00:46 +0000 Subject: Attempt to fix the PPC bug. FUCK REPRESENTATION OF CHARS WITH A CHAINSAW, SIDEWAYS. --- src/libs6dns/s6dns_message_header_pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libs6dns/s6dns_message_header_pack.c') diff --git a/src/libs6dns/s6dns_message_header_pack.c b/src/libs6dns/s6dns_message_header_pack.c index 99ffa8a..ff496fa 100644 --- a/src/libs6dns/s6dns_message_header_pack.c +++ b/src/libs6dns/s6dns_message_header_pack.c @@ -6,7 +6,7 @@ void s6dns_message_header_pack (char *s, s6dns_message_header_t const *h) { uint16_pack_big(s, h->id) ; - s[2] = (h->qr << 7) | (h->opcode << 3) | (h->aa << 2) | (h->tc << 1) | h->rd ; + s[2] = (char)(unsigned char)((h->qr << 7) | (h->opcode << 3) | (h->aa << 2) | (h->tc << 1) | h->rd) ; s[3] = (h->z << 4) | h->rcode ; s6dns_message_counts_pack(s+4, &h->counts) ; } -- cgit v1.3.1