X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/0db4a45bf91faa06616a90865068ac6c07885edf..a176a0794da2ffb2025076c0ec0e9e6750a560a6:/apt-pkg/contrib/mmap.cc diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index bc22fba67..88e71e8e3 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -21,10 +21,6 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#ifdef __GNUG__ -#pragma implementation "apt-pkg/mmap.h" -#endif - #define _BSD_SOURCE #include #include @@ -155,9 +151,9 @@ DynamicMMap::DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace) unsigned long EndOfFile = Fd->Size(); if (EndOfFile > WorkSpace) WorkSpace = EndOfFile; - else + else if(WorkSpace > 0) { - Fd->Seek(WorkSpace); + Fd->Seek(WorkSpace - 1); char C = 0; Fd->Write(&C,sizeof(C)); }