Skip to content

Commit 337e366

Browse files
author
Paul Sokolovsky
committed
webrepl_cli.py: Set explicit byte order for all structures.
1 parent d8f6bba commit 337e366

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

webrepl_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
SANDBOX = "/tmp/webrepl/"
1515

1616

17-
WEBREPL_FILE = "3sBBBHQH64s"
17+
WEBREPL_FILE = "<3sBBBHQH64s"
1818

1919
if USE_BUILTIN_WEBSOCKET:
2020
from websocket import websocket
@@ -66,7 +66,7 @@ def ioctl(self, req, val):
6666

6767
def read_resp(ws):
6868
data = ws.read(4)
69-
sig, code = struct.unpack("2sH", data)
69+
sig, code = struct.unpack("<2sH", data)
7070
assert sig == b"WB"
7171
return code
7272

0 commit comments

Comments
 (0)