From 4573af4b710be365d3ce0d369d677ca34dd426c9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 18:31:49 +0000 Subject: [PATCH] Fix off-by-one error in expandShortPathNative buffer conversion Agent-Logs-Url: https://github.com/github/vscode-codeql/sessions/8f55b472-80f3-41e0-8d94-0a7cf66671e4 Co-authored-by: cklin <1418580+cklin@users.noreply.github.com> --- extensions/ql-vscode/src/common/short-paths.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/ql-vscode/src/common/short-paths.ts b/extensions/ql-vscode/src/common/short-paths.ts index 860544c38d4..3f6698d7ec6 100644 --- a/extensions/ql-vscode/src/common/short-paths.ts +++ b/extensions/ql-vscode/src/common/short-paths.ts @@ -170,7 +170,7 @@ async function expandShortPathNative(shortPath: string, logger: BaseLogger) { throw new Error("Failed to get long path name"); } - const longPath = buffer.toString("utf16le", 0, (result - 1) * 2); + const longPath = buffer.toString("utf16le", 0, result * 2); void logger.log(`Expanded short path ${shortPath} to ${longPath}`);