aboutsummaryrefslogtreecommitdiff
path: root/patch-delta.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-06-20 21:46:10 -0700
committerJunio C Hamano <gitster@pobox.com>2009-06-20 21:46:10 -0700
commit7c74c3926ad60ba1bbfed13355f00a29813a0f32 (patch)
tree45d5169b6377988e617a9d1a2096b98f31d07a49 /patch-delta.c
parentd4f6bc887de7957645b998a0b0e22bc4048f36dd (diff)
parent48fb7deb5bbd87933e7d314b73d7c1b52667f80f (diff)
downloadgit-7c74c3926ad60ba1bbfed13355f00a29813a0f32.tar.gz
git-7c74c3926ad60ba1bbfed13355f00a29813a0f32.tar.xz
Merge branch 'lt/maint-unsigned-left-shift'
* lt/maint-unsigned-left-shift: Fix big left-shifts of unsigned char
Diffstat (limited to 'patch-delta.c')
-rw-r--r--patch-delta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/patch-delta.c b/patch-delta.c
index ed9db81fa..ef748ce96 100644
--- a/patch-delta.c
+++ b/patch-delta.c
@@ -44,7 +44,7 @@ void *patch_delta(const void *src_buf, unsigned long src_size,
if (cmd & 0x01) cp_off = *data++;
if (cmd & 0x02) cp_off |= (*data++ << 8);
if (cmd & 0x04) cp_off |= (*data++ << 16);
- if (cmd & 0x08) cp_off |= (*data++ << 24);
+ if (cmd & 0x08) cp_off |= ((unsigned) *data++ << 24);
if (cmd & 0x10) cp_size = *data++;
if (cmd & 0x20) cp_size |= (*data++ << 8);
if (cmd & 0x40) cp_size |= (*data++ << 16);