summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit364e8b771db2a34256d5f7738c30c664f0dc5dc9 (patch)
treef6485363ea3351081069a4e18091317d1281bdf8 /llvm/lib/Support/FileUtilities.cpp
parentdff29cd72e3803aae37a94dab394b8cc7865b6fb (diff)
downloadbcm5719-llvm-364e8b771db2a34256d5f7738c30c664f0dc5dc9.tar.gz
bcm5719-llvm-364e8b771db2a34256d5f7738c30c664f0dc5dc9.zip
Fix a bug in previous checkin
llvm-svn: 19769
Diffstat (limited to 'llvm/lib/Support/FileUtilities.cpp')
-rw-r--r--llvm/lib/Support/FileUtilities.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/FileUtilities.cpp b/llvm/lib/Support/FileUtilities.cpp
index 79cca8fda1d..8ce9602872a 100644
--- a/llvm/lib/Support/FileUtilities.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud