X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=patch-delta.c;h=e02e13bd4eb2a92626c2d6f9cbf264abb15de9c5;hb=292ce46b60e2c12450c5c21044acf9c41bd837df;hp=ed9db81fa82c812c9ffa07f5a40540dbb15da0d3;hpb=87fb597d4e3643210e1967d1e3035f28f5b019e5;p=git.git diff --git a/patch-delta.c b/patch-delta.c index ed9db81fa..e02e13bd4 100644 --- a/patch-delta.c +++ b/patch-delta.c @@ -2,7 +2,7 @@ * patch-delta.c: * recreate a buffer from a source and the delta produced by diff-delta.c * - * (C) 2005 Nicolas Pitre + * (C) 2005 Nicolas Pitre * * This code is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -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);