diff options
| author | Ben Straub <bs@github.com> | 2013-08-05 11:41:39 -0700 |
|---|---|---|
| committer | Ben Straub <bs@github.com> | 2013-08-05 11:41:39 -0700 |
| commit | d85636190f127efa2ec4a6593124c037dfec0ba9 (patch) | |
| tree | 1c19c3cd463e69472d6d58cebd560d8ec025796e /src/fileops.c | |
| parent | 9b7d02ff2d9b87d61778ee7ef5e2d43bf4c561f0 (diff) | |
| download | libgit2-d85636190f127efa2ec4a6593124c037dfec0ba9.tar.gz | |
Split UTF-16 and UTF-8 buffer sizes for win32
Also fixed up call-sites to use the correct buffer sizes, especially
when converting to utf-8.
Diffstat (limited to 'src/fileops.c')
| -rw-r--r-- | src/fileops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fileops.c b/src/fileops.c index 7f8418d7a..36fcc73df 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -58,9 +58,9 @@ int git_futils_creat_locked(const char *path, const mode_t mode) int fd; #ifdef GIT_WIN32 - wchar_t buf[GIT_WIN_PATH]; + wchar_t buf[GIT_WIN_PATH_UTF16]; - git__utf8_to_16(buf, GIT_WIN_PATH, path); + git__utf8_to_16(buf, GIT_WIN_PATH_UTF16, path); fd = _wopen(buf, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL | O_BINARY | O_CLOEXEC, mode); #else |
