From b9f8be3323ee3ff40f07b4f6b7cef54792acce09 Mon Sep 17 00:00:00 2001 From: gigaherz Date: Sun, 2 Dec 2012 01:06:00 +0000 Subject: [PATCH] Fix blockdumps containing 2352byte sectors. git-svn-id: http://pcsx2.googlecode.com/svn/branches/async-iso@5469 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/CDVD/InputIsoFile.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcsx2/CDVD/InputIsoFile.cpp b/pcsx2/CDVD/InputIsoFile.cpp index c51dc40e9b..4fccad37e8 100644 --- a/pcsx2/CDVD/InputIsoFile.cpp +++ b/pcsx2/CDVD/InputIsoFile.cpp @@ -130,6 +130,7 @@ int InputIsoFile::FinishRead3(u8* dst, uint mode) int end = min(end1, end2); int diff = m_blockofs - _offset; + int ndiff = 0; if(diff > 0) { memset(dst, 0, diff); @@ -137,13 +138,14 @@ int InputIsoFile::FinishRead3(u8* dst, uint mode) } else { + ndiff = -diff; diff = 0; } length = end - _offset; uint read_offset = (m_current_lsn - m_read_lsn) * m_blocksize; - memcpy_fast(dst + diff, m_readbuffer + read_offset, length); + memcpy_fast(dst + diff, m_readbuffer + ndiff + read_offset, length); if (m_type == ISOTYPE_CD && diff >= 12) {