Skip to content

Commit b020c8a

Browse files
authored
Merge pull request #11 from ARMmbed/port-guard
Add guard against decrementing port number
2 parents b91b6d7 + 6a330c2 commit b020c8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pyocd-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class PyocdServer extends AbstractServer {
3636
protected progress = 0;
3737

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

0 commit comments

Comments
 (0)