X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=base85.c;h=b417a15bbc83fff7180078a4cf9f73603477a295;hb=2374502c6ca1c8007cb35682f13fb5db044df9ea;hp=a6c41d597ab8eccb5eb2ccf2b3b543398c360b44;hpb=f98157720239f0dd94d03632dc873e3eb3135e2f;p=git.git diff --git a/base85.c b/base85.c index a6c41d597..b417a15bb 100644 --- a/base85.c +++ b/base85.c @@ -66,7 +66,7 @@ int decode_85(char *dst, const char *buffer, int len) */ if (0x03030303 < acc || 0xffffffff - de < (acc *= 85)) - error("invalid base85 sequence %.5s", buffer-5); + return error("invalid base85 sequence %.5s", buffer-5); acc += de; say1(" %08x", acc); @@ -91,7 +91,7 @@ void encode_85(char *buf, const unsigned char *data, int bytes) unsigned acc = 0; int cnt; for (cnt = 24; cnt >= 0; cnt -= 8) { - int ch = *data++; + unsigned ch = *data++; acc |= ch << cnt; if (--bytes == 0) break;