summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-05-24 13:44:24 -0700
committerRussell Belfer <rb@github.com>2012-05-24 13:44:24 -0700
commit9e35d7fd6ee0b6dc0008982ab84668fbb2478939 (patch)
treec00c97982770a62a1c258adbca48e8ffce8918c1 /src/commit.c
parent23059130078be6982f75ab5620c55222471f3423 (diff)
downloadlibgit2-9e35d7fd6ee0b6dc0008982ab84668fbb2478939.tar.gz
Fix bugs in UTF-8 <-> UTF-16 conversion
The function to convert UTF-16 to UTF-8 was only allocating a buffer of wcslen(utf16str) bytes for the UTF-8 string, but that is not sufficient if you have multibyte characters, and so when those occured, the conversion was failing. This updates the conversion functions to use the Win APIs to calculate the correct buffer lengths. Also fixes a comparison in the unit tests that would fail if you did not have a particular environment variable set.
Diffstat (limited to 'src/commit.c')
0 files changed, 0 insertions, 0 deletions