Skip to content

Commit 6a330c2

Browse files
committed
Add guard against decrementing port number
1 parent b91b6d7 commit 6a330c2

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)