aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/base85.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/misc/base85.c')
-rw-r--r--ext/misc/base85.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/misc/base85.c b/ext/misc/base85.c
index 019136874..5ec136dbc 100644
--- a/ext/misc/base85.c
+++ b/ext/misc/base85.c
@@ -171,7 +171,8 @@ static char* toBase85( u8 *pIn, int nbIn, char *pOut, char *pSep ){
int nCol = 0;
while( nbIn >= 4 ){
int nco = 5;
- unsigned long qbv = (pIn[0]<<24)|(pIn[1]<<16)|(pIn[2]<<8)|pIn[3];
+ unsigned long qbv = (((unsigned long)pIn[0])<<24) |
+ (pIn[1]<<16) | (pIn[2]<<8) | pIn[3];
while( nco > 0 ){
unsigned nqv = (unsigned)(qbv/85UL);
unsigned char dv = qbv - 85UL*nqv;