From c15300446ede60b9dd28b8f18b355652ec390a5a Mon Sep 17 00:00:00 2001 From: janwas Date: Thu, 3 Jun 2004 14:20:09 +0000 Subject: [PATCH] fix stupid mmap bug reported by simon This was SVN commit r387. --- source/lib/res/file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/res/file.cpp b/source/lib/res/file.cpp index 721333aea1..01de5f280a 100755 --- a/source/lib/res/file.cpp +++ b/source/lib/res/file.cpp @@ -1327,7 +1327,7 @@ int file_map(File* const f, void*& p, size_t& size) } const int prot = (f->flags & FILE_WRITE)? PROT_WRITE : PROT_READ; - f->mapping = mmap((void*)0, size, prot, MAP_PRIVATE, f->fd, (off_t)0); + f->mapping = mmap((void*)0, f->size, prot, MAP_PRIVATE, f->fd, (off_t)0); if(!f->mapping) return ERR_NO_MEM;