Skip to content

Commit d481549

Browse files
authored
Merge pull request #966 from flit/bugfix/disasm_cmd
Commands: fix disasm command argument parsing
2 parents 6ccf584 + 34a9da4 commit d481549

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyocd/commands/commands.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,9 @@ class DisassembleCommand(CommandBase):
365365
}
366366

367367
def parse(self, args):
368-
self.center = (len(args) > 1) and (args.pop(0) in ('-c', '--center'))
368+
self.center = (len(args) > 1) and (args[0] in ('-c', '--center'))
369+
if self.center:
370+
del args[0]
369371
self.addr = self._convert_value(args[0])
370372
if len(args) < 2:
371373
self.count = 6

0 commit comments

Comments
 (0)