Skip to content

Commit 4573af4

Browse files
Copilotcklin
andauthored
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>
1 parent 375738c commit 4573af4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/ql-vscode/src/common/short-paths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ async function expandShortPathNative(shortPath: string, logger: BaseLogger) {
170170
throw new Error("Failed to get long path name");
171171
}
172172

173-
const longPath = buffer.toString("utf16le", 0, (result - 1) * 2);
173+
const longPath = buffer.toString("utf16le", 0, result * 2);
174174

175175
void logger.log(`Expanded short path ${shortPath} to ${longPath}`);
176176

0 commit comments

Comments
 (0)