Skip to content

Commit feb51d5

Browse files
committed
Fixes #240 - IndexError: list index out of range
Thanks to https://github.com/gusc (Gusts Kaksis) for the patch.
1 parent d7cccae commit feb51d5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/scripts/lldb.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ def run_command(debugger, command, result, internal_dict):
3232
args = command.split('--',1)
3333
error = lldb.SBError()
3434
lldb.target.modules[0].SetPlatformFileSpec(lldb.SBFileSpec(device_app))
35-
lldb.target.Launch(lldb.SBLaunchInfo(shlex.split(args[1] and args[1] or '{args}')), error)
35+
args_arr = []
36+
if len(args) > 1:
37+
args_arr = shlex.split(args[1] and args[1] or '{args}')
38+
lldb.target.Launch(lldb.SBLaunchInfo(args_arr), error)
3639
lockedstr = ': Locked'
3740
if lockedstr in str(error):
3841
print('\\nDevice Locked\\n')

0 commit comments

Comments
 (0)