|
@@ -99,10 +99,10 @@ def unpacket(bytes):
|
|
|
return (2, lpacket(stuff[0], stuff[1], stuff[2], stuff[3], stuff[4]))
|
|
|
# circuitDB packet
|
|
|
else:
|
|
|
- nlinks = struct.unpack("<I", bytes)
|
|
|
+ nlinks = struct.unpack_from("<I", bytes, 0)[0]
|
|
|
links = []
|
|
|
for i in range(0, nlinks):
|
|
|
- stuff = struct.unpack("<II", bytes, i * 8 + 4)
|
|
|
+ stuff = struct.unpack_from("<II", bytes, i * 8 + 4)
|
|
|
links.append(link(stuff[0], stuff[1]))
|
|
|
|
|
|
return (3, cpacket(nlinks, links))
|