From 3a322d723401ebd6fa9e9a8d0dd13be5518450ad Mon Sep 17 00:00:00 2001 From: Stanislav Ravas Date: Sat, 6 Feb 2021 00:06:14 +0100 Subject: [PATCH] getSourceNameByPath(): Fix first character cut-off --- src/DukDebugger.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DukDebugger.ts b/src/DukDebugger.ts index 1bbb345..65effe3 100644 --- a/src/DukDebugger.ts +++ b/src/DukDebugger.ts @@ -2163,7 +2163,7 @@ export class DukDebugSession extends DebugSession { for (let rpath of this._sourceRoots) { if (fpath.indexOf(rpath) === 0) { - const sourceName = fpath.substr(rpath.length + 1); + const sourceName = fpath.substr(rpath.length); this.dbgLog(`[getSourceNameByPath] Path found in source root '${rpath}' source name: ${sourceName}`); return sourceName; }