We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 98db67e + 26620e1 commit 9644c6bCopy full SHA for 9644c6b
1 file changed
ppadb/command/transport/__init__.py
@@ -45,7 +45,7 @@ def screencap(self):
45
conn.send(cmd)
46
result = conn.read_all()
47
48
- if result[5] == 0x0d:
+ if result and len(result) > 5 and result[5] == 0x0d:
49
return result.replace(b'\r\n', b'\n')
50
else:
51
return result
0 commit comments