summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-01-04 21:15:12 +0100
committernulltoken <emeric.fermas@gmail.com>2012-01-04 21:15:12 +0100
commitf46e622636c5196829329f7bcf2226b36e61f7ed (patch)
tree3fc9ecde94ca9ffbe72705bbb11a4bc279c36edd /src
parentacb159e19159f63651eb2ccc8e4a4a31771c08c5 (diff)
downloadlibgit2-f46e622636c5196829329f7bcf2226b36e61f7ed.tar.gz
Fix Windows specific off-by-one error
The value returned by MultiByteToWideChar includes the NULL termination character.
Diffstat (limited to 'src')
-rw-r--r--src/fileops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileops.c b/src/fileops.c
index 5eb7bf6ec..48bd3514d 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -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;
}