what you are trying to solve here is the boundary condition when the filesize is a whole multiple of sectorsize. It seems to me that ``` while (lSize > 0 && pContext->m_dwFilePos < pContext->m_dwFileSize) ``` instead would be better (cleaner)