scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 6ff9042e978fbc63cd8c012eb5b428686a0de8c7
parent 0dfc9769e7eb4e2f8956e7328841c19eb6845587
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 25 Jan 2018 12:31:47 +0100

[as] Fix lunpack()

q specifier is at least 64 bits, so the cast must be long long.

Diffstat:
Mlib/scc/lunpack.c | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/scc/lunpack.c b/lib/scc/lunpack.c @@ -36,14 +36,14 @@ lunpack(unsigned char *src, char *fmt, ...) break; case 'q': qp = va_arg(va, unsigned long long *); - q = (unsigned long) *bp++ << 56; - q |= (unsigned long) *bp++ << 48; - q |= (unsigned long) *bp++ << 40; - q |= (unsigned long) *bp++ << 32; - q |= (unsigned long) *bp++ << 24; - q |= (unsigned long) *bp++ << 16; - q |= (unsigned long) *bp++ << 8; - q |= (unsigned long) *bp++; + q = (unsigned long long) *bp++ << 56; + q |= (unsigned long long) *bp++ << 48; + q |= (unsigned long long) *bp++ << 40; + q |= (unsigned long long) *bp++ << 32; + q |= (unsigned long long) *bp++ << 24; + q |= (unsigned long long) *bp++ << 16; + q |= (unsigned long long) *bp++ << 8; + q |= (unsigned long long) *bp++; *qp = q; break; default: