From bbd00dc2762adc53375db3278090fb0d4cc3afd1 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 19 Jun 2004 11:44:03 +0000 Subject: [PATCH] fixed MMapBuf on POSIX git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3569 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/strlist.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/strlist.h b/Source/strlist.h index 692df17b..d73da06b 100644 --- a/Source/strlist.h +++ b/Source/strlist.h @@ -270,11 +270,7 @@ class SortedStringList int pos=find(str, case_sensitive); if (pos==-1) return 1; - T *db=(T *)gr.get(); - free(db[pos].name); - freestruct(pos); - memmove(db+pos,db+pos+1,gr.getlen()-(pos*sizeof(T))-sizeof(T)); - gr.resize(gr.getlen()-sizeof(T)); + delbypos(pos); return 0; } @@ -707,7 +703,11 @@ class MMapFile : public IMMap quit(); } +#ifdef _WIN32 return (void *)((char *)m_pView + offset - alignedoffset); +#else + return m_pView; +#endif } void *getmore(int offset, int *size)