]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/mmap.cc
* wording fixes (cherry picked from apt--mvo)
[apt.git] / apt-pkg / contrib / mmap.cc
index bc22fba6766684aec2f84f1b88d2dfbd44ca952d..e395e6cc74f5c6741a4220cdbb19935e81d1457a 100644 (file)
@@ -155,9 +155,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));
    }