From ddd266298303c4bc7e89b95a4189f3ff39e3447e Mon Sep 17 00:00:00 2001 From: hno <> Date: Sat, 20 Apr 2002 03:03:48 +0000 Subject: [PATCH] Explicitly truncate the value to indicate that we know truncation is needed when assigning an int derived value to a char.. --- lib/base64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/base64.c b/lib/base64.c index 20e893bd74..adee8e334a 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -1,5 +1,5 @@ /* - * $Id: base64.c,v 1.19 2001/06/29 20:20:01 wessels Exp $ + * $Id: base64.c,v 1.20 2002/04/19 21:03:48 hno Exp $ */ #include "config.h" @@ -58,7 +58,7 @@ base64_decode(const char *p) if (++c < 4) continue; /* One quantum of four encoding characters/24 bit */ - result[j++] = val >> 16; /* High 8 bits */ + result[j++] = (val >> 16) & 0xff; /* High 8 bits */ result[j++] = (val >> 8) & 0xff; /* Mid 8 bits */ result[j++] = val & 0xff; /* Low 8 bits */ val = c = 0; -- 2.47.3