From b2fad485cd5b41744ef0cc4a02722c021afd926c Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Mon, 1 Dec 2014 00:07:01 +0000 Subject: ZeroMemory -> memset, few bugs fised git-svn-id: http://svn.miranda-ng.org/main/trunk@11184 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbcache.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Db3x_mmap/src/dbcache.cpp') diff --git a/plugins/Db3x_mmap/src/dbcache.cpp b/plugins/Db3x_mmap/src/dbcache.cpp index 3c301b0162..d4ddb83ad3 100644 --- a/plugins/Db3x_mmap/src/dbcache.cpp +++ b/plugins/Db3x_mmap/src/dbcache.cpp @@ -79,7 +79,7 @@ void CDb3Mmap::DBMoveChunk(DWORD ofsDest, DWORD ofsSource, int bytes) log0("buggy move!"); } if (x > 0) - ZeroMemory(m_pDbCache + ofsDest + bytes - x, x); + memset((m_pDbCache + ofsDest + bytes - x), 0, x); if (ofsSource < m_dwFileSize) MoveMemory(m_pDbCache + ofsDest, m_pDbCache + ofsSource, bytes - x); @@ -116,8 +116,8 @@ void CDb3Mmap::DBWrite(DWORD ofs, PVOID pData, int bytes) void CDb3Mmap::DBFill(DWORD ofs, int bytes) { //log2("zerofill %d@%08x",bytes,ofs); - if (ofs+bytes <= m_dwFileSize) - ZeroMemory(m_pDbCache+ofs,bytes); + if ((ofs + bytes) <= m_dwFileSize) + memset((m_pDbCache + ofs), 0, bytes); logg(); } -- cgit v1.2.3