aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/FileUtilities.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-23 03:19:13 +0000
committerChris Lattner <sabre@nondot.org>2005-01-23 03:19:13 +0000
commitc95b5604e0a248f59c2cf2d4ed93122d8c42bd45 (patch)
treeae0ece85761fcc3db7bbaac383122c8daf4d99a0 /lib/Support/FileUtilities.cpp
parent220df9c13de8557173cb71425ea32fe63a55b886 (diff)
downloadexternal_llvm-c95b5604e0a248f59c2cf2d4ed93122d8c42bd45.zip
external_llvm-c95b5604e0a248f59c2cf2d4ed93122d8c42bd45.tar.gz
external_llvm-c95b5604e0a248f59c2cf2d4ed93122d8c42bd45.tar.bz2
Fix a bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/FileUtilities.cpp')
-rw-r--r--lib/Support/FileUtilities.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/FileUtilities.cpp b/lib/Support/FileUtilities.cpp
index 79cca8f..8ce9602 100644
--- a/lib/Support/FileUtilities.cpp
+++ b/lib/Support/FileUtilities.cpp
@@ -239,9 +239,9 @@ int llvm::DiffFilesWithTolerance(const std::string &FileA,
}
if (OrigFile1Start != File1Start)
- delete[] File1Start;
+ delete[] File1Start-1; // Back up past null byte
if (OrigFile2Start != File2Start)
- delete[] File2Start;
+ delete[] File2Start-1; // Back up past null byte
return CompareFailed;
} catch (const std::string &Msg) {
if (Error) *Error = Msg;