diff options
Diffstat (limited to 'delta.h')
-rw-r--r-- | delta.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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; |