From ea8651059209b96fa005e06a0b9b33ae5a8eacd4 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Fri, 8 Oct 1999 23:54:40 +0000 Subject: [PATCH] cast token as_ulong to unsigned char rather than use token as_char because the latter will give the wrong value on big-endian systems. --- lib/dns/rdata/generic/sig_24.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dns/rdata/generic/sig_24.c b/lib/dns/rdata/generic/sig_24.c index 8ebd984427..abd8c6dc7f 100644 --- a/lib/dns/rdata/generic/sig_24.c +++ b/lib/dns/rdata/generic/sig_24.c @@ -15,7 +15,7 @@ * SOFTWARE. */ - /* $Id: sig_24.c,v 1.24 1999/10/08 21:42:23 tale Exp $ */ + /* $Id: sig_24.c,v 1.25 1999/10/08 23:54:40 tale Exp $ */ /* RFC 2065 */ @@ -67,7 +67,7 @@ fromtext_sig(dns_rdataclass_t rdclass, dns_rdatatype_t type, RETERR(gettoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); if (token.value.as_ulong > 0xff) return (DNS_R_RANGE); - c = token.value.as_char; + c = (unsigned char)token.value.as_ulong; RETERR(mem_tobuffer(target, &c, 1)); /* original ttl */