Skip to content

Commit

Permalink
Merge pull request #11 from ARMmbed/port-guard
Browse files Browse the repository at this point in the history
Add guard against decrementing port number
  • Loading branch information
arekzaluski authored Oct 20, 2020
2 parents b91b6d7 + 6a330c2 commit b020c8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyocd-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class PyocdServer extends AbstractServer {
protected progress = 0;

public resolveGdbPort(port: number): number {
if (this.args.gdbCore) {
if (this.args.gdbCore && this.args.gdbCore > 0) {
// PyOCD starts each core on a subsequent port
// (e.g. core 0 on starting port, core 1 on starting port +1, etc.)
port += this.args.gdbCore;
Expand Down

0 comments on commit b020c8a

Please sign in to comment.