OSDN Git Service

Fix tail mass data problem at end of mail.
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / Patch.cpp
index d479e41..bdf20e2 100644 (file)
@@ -132,7 +132,7 @@ int CPatch::Parser(CString &pathfile)
 {\r
        CString str;\r
 \r
-       CStdioFile PatchFile;\r
+       CFile PatchFile;\r
 \r
        m_PathFile=pathfile;\r
        if( ! PatchFile.Open(pathfile,CFile::modeRead) )\r
@@ -154,7 +154,8 @@ int CPatch::Parser(CString &pathfile)
 \r
        LONGLONG offset=PatchFile.GetPosition();\r
 #endif\r
-       PatchFile.Read(m_Body.GetBufferSetLength(PatchFile.GetLength()),PatchFile.GetLength());\r
+       PatchFile.Read(m_Body.GetBuffer(PatchFile.GetLength()),PatchFile.GetLength());\r
+       m_Body.ReleaseBuffer();\r
        PatchFile.Close();\r
 \r
        int start=0;\r