Fixed File::SeekFromEnd() to use SEEK_END insted of SEEK_CUR.
authorGreg Clayton <gclayton@apple.com>
Tue, 30 Oct 2012 17:04:45 +0000 (17:04 +0000)
committerGreg Clayton <gclayton@apple.com>
Tue, 30 Oct 2012 17:04:45 +0000 (17:04 +0000)
llvm-svn: 167025

lldb/source/Host/common/File.cpp

index ca0c223..7fd5dd6 100644 (file)
@@ -360,7 +360,7 @@ File::SeekFromEnd (off_t& offset)
     Error error;
     if (DescriptorIsValid())
     {
-        offset = ::lseek (m_descriptor, offset, SEEK_CUR);
+        offset = ::lseek (m_descriptor, offset, SEEK_END);
         
         if (offset == -1)
             error.SetErrorToErrno();