##// END OF EJS Templates
py3: slice over bytes to prevent getting the ascii values...
Pulkit Goyal -
r38095:86e0a4be default
parent child Browse files
Show More
@@ -1958,31 +1958,31 b' def applybindelta(binchunk, data):'
1958 1958 binchunk = binchunk[s:]
1959 1959 i = 0
1960 1960 while i < len(binchunk):
1961 cmd = ord(binchunk[i])
1961 cmd = ord(binchunk[i:i + 1])
1962 1962 i += 1
1963 1963 if (cmd & 0x80):
1964 1964 offset = 0
1965 1965 size = 0
1966 1966 if (cmd & 0x01):
1967 offset = ord(binchunk[i])
1967 offset = ord(binchunk[i:i + 1])
1968 1968 i += 1
1969 1969 if (cmd & 0x02):
1970 offset |= ord(binchunk[i]) << 8
1970 offset |= ord(binchunk[i:i + 1]) << 8
1971 1971 i += 1
1972 1972 if (cmd & 0x04):
1973 offset |= ord(binchunk[i]) << 16
1973 offset |= ord(binchunk[i:i + 1]) << 16
1974 1974 i += 1
1975 1975 if (cmd & 0x08):
1976 offset |= ord(binchunk[i]) << 24
1976 offset |= ord(binchunk[i:i + 1]) << 24
1977 1977 i += 1
1978 1978 if (cmd & 0x10):
1979 size = ord(binchunk[i])
1979 size = ord(binchunk[i:i + 1])
1980 1980 i += 1
1981 1981 if (cmd & 0x20):
1982 size |= ord(binchunk[i]) << 8
1982 size |= ord(binchunk[i:i + 1]) << 8
1983 1983 i += 1
1984 1984 if (cmd & 0x40):
1985 size |= ord(binchunk[i]) << 16
1985 size |= ord(binchunk[i:i + 1]) << 16
1986 1986 i += 1
1987 1987 if size == 0:
1988 1988 size = 0x10000
General Comments 0
You need to be logged in to leave comments. Login now