[llvm-commits] CVS: llvm/lib/Support/FileUtilities.cpp

Chris Lattner lattner at cs.uiuc.edu
Sat Jan 22 19:19:26 PST 2005



Changes in directory llvm/lib/Support:

FileUtilities.cpp updated: 1.36 -> 1.37
---
Log message:

Fix a bug in previous checkin


---
Diffs of the changes:  (+2 -2)

 FileUtilities.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Support/FileUtilities.cpp
diff -u llvm/lib/Support/FileUtilities.cpp:1.36 llvm/lib/Support/FileUtilities.cpp:1.37
--- llvm/lib/Support/FileUtilities.cpp:1.36	Sat Jan 22 21:13:43 2005
+++ llvm/lib/Support/FileUtilities.cpp	Sat Jan 22 21:19:13 2005
@@ -239,9 +239,9 @@
     }
 
     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;






More information about the llvm-commits mailing list