Commit f46e6226 by nulltoken

Fix Windows specific off-by-one error

The value returned by MultiByteToWideChar includes the NULL termination character.
parent acb159e1
......@@ -486,7 +486,7 @@ static int win32_find_system_file(git_buf *path, const char *filename)
filename++;
if (gitwin_append_utf16(file_utf16 + root->len - 1, filename, len + 1) !=
(int)len) {
(int)len + 1) {
error = git__throw(GIT_EOSERR, "Failed to build file path");
goto cleanup;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment