Skip to content

Commit 7c66b1b

Browse files
authored
Merge pull request #99 from BearDimonR/patch-1
Fix reading json string
2 parents 58088e8 + c56bf25 commit 7c66b1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

asyncmy/replication/packets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def read_variable_length_string(self):
251251
length = 0
252252
bits_read = 0
253253
while byte & 0x80 != 0:
254-
byte = struct.pack("!B", self.read(1))
254+
byte = struct.unpack("!B", self.read(1))[0]
255255
length = length | ((byte & 0x7F) << bits_read)
256256
bits_read = bits_read + 7
257257
return self.read(length)

0 commit comments

Comments
 (0)