From 6fdbe76532b97a66f916b7a0f2e1dea40b85e241 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 13 Jan 2009 19:40:14 +0000 Subject: [PATCH] file fixes --- src/file.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/file.cpp b/src/file.cpp index 8fffd442d..b2a4f4033 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -311,8 +311,8 @@ namespace libtorrent for (file::iovec_t const* i = bufs, *end(bufs + num_bufs); i < end; ++i) { DWORD intermediate = 0; - if (ReadFile(m_file_handle, (char*)bufs->iov_base - , (DWORD)bufs->iov_len, &intermediate, 0) == FALSE) + if (ReadFile(m_file_handle, (char*)i->iov_base + , (DWORD)i->iov_len, &intermediate, 0) == FALSE) { ec = error_code(GetLastError(), get_system_category()); return -1; @@ -468,8 +468,8 @@ namespace libtorrent for (file::iovec_t const* i = bufs, *end(bufs + num_bufs); i < end; ++i) { DWORD intermediate = 0; - if (WriteFile(m_file_handle, (char const*)bufs->iov_base - , (DWORD)bufs->iov_len, &intermediate, 0) == FALSE) + if (WriteFile(m_file_handle, (char const*)i->iov_base + , (DWORD)i->iov_len, &intermediate, 0) == FALSE) { ec = error_code(GetLastError(), get_system_category()); return -1;