diff options
author | Philip Kelley <phkelley@hotmail.com> | 2013-01-08 17:10:33 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2013-01-08 19:53:19 +0400 |
commit | 48aae611fa0592e57d24d218e1761f23374699b1 (patch) | |
tree | af50a222334ea5b001221b55e04bd625b4a97c11 /LibGit2Sharp/ContentChanges.cs | |
parent | 0a0d15772969342b0ef54aab63126254876c4da0 (diff) |
Improve perf and correctness of UTF-8 marshaling
Diffstat (limited to 'LibGit2Sharp/ContentChanges.cs')
-rw-r--r-- | LibGit2Sharp/ContentChanges.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LibGit2Sharp/ContentChanges.cs b/LibGit2Sharp/ContentChanges.cs index 3033bb86..207dc905 100644 --- a/LibGit2Sharp/ContentChanges.cs +++ b/LibGit2Sharp/ContentChanges.cs @@ -39,7 +39,7 @@ namespace LibGit2Sharp private int HunkCallback(GitDiffDelta delta, GitDiffRange range, IntPtr header, UIntPtr headerlen, IntPtr payload) { - string decodedContent = Utf8Marshaler.FromNative(header, (uint)headerlen); + string decodedContent = Utf8Marshaler.FromNative(header, (int)headerlen); AppendToPatch(decodedContent); return 0; @@ -47,7 +47,7 @@ namespace LibGit2Sharp private int LineCallback(GitDiffDelta delta, GitDiffRange range, GitDiffLineOrigin lineorigin, IntPtr content, UIntPtr contentlen, IntPtr payload) { - string decodedContent = Utf8Marshaler.FromNative(content, (uint)contentlen); + string decodedContent = Utf8Marshaler.FromNative(content, (int)contentlen); string prefix; |