|
@@ -1621,15 +1621,15 @@ def create_delta(base_buf, target_buf):
|
|
|
# Write out an opcode that says what range to use
|
|
|
scratch = ''
|
|
|
op = 0x80
|
|
|
- o = i1
|
|
|
+ copy_start = i1
|
|
|
for i in range(4):
|
|
|
- if o & 0xff << i*8:
|
|
|
- scratch += chr((o >> i*8) & 0xff)
|
|
|
+ if copy_start & 0xff << i*8:
|
|
|
+ scratch += chr((copy_start >> i*8) & 0xff)
|
|
|
op |= 1 << i
|
|
|
- s = i2 - i1
|
|
|
+ copy_len = i2 - i1
|
|
|
for i in range(2):
|
|
|
- if s & 0xff << i*8:
|
|
|
- scratch += chr((s >> i*8) & 0xff)
|
|
|
+ if copy_len & 0xff << i*8:
|
|
|
+ scratch += chr((copy_len >> i*8) & 0xff)
|
|
|
op |= 1 << (4+i)
|
|
|
out_buf += chr(op)
|
|
|
out_buf += scratch
|