aboutsummaryrefslogtreecommitdiff
path: root/delta.h
diff options
context:
space:
mode:
Diffstat (limited to 'delta.h')
-rw-r--r--delta.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/delta.h b/delta.h
index 40ccf5a1e..b9d333dd5 100644
--- a/delta.h
+++ b/delta.h
@@ -90,12 +90,11 @@ static inline unsigned long get_delta_hdr_size(const unsigned char **datap,
const unsigned char *top)
{
const unsigned char *data = *datap;
- unsigned char cmd;
- unsigned long size = 0;
+ unsigned long cmd, size = 0;
int i = 0;
do {
cmd = *data++;
- size |= (cmd & ~0x80) << i;
+ size |= (cmd & 0x7f) << i;
i += 7;
} while (cmd & 0x80 && data < top);
*datap = data;