From cf732972d98120e9cbf8d7455d38b6bbe4138d41 Mon Sep 17 00:00:00 2001 From: Sonicadvance1 Date: Mon, 25 May 2009 13:16:40 +0000 Subject: [PATCH] Windows side compile fix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3285 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/BBA-TAP/TAP_Win32.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/Src/HW/BBA-TAP/TAP_Win32.cpp b/Source/Core/Core/Src/HW/BBA-TAP/TAP_Win32.cpp index 032570e220..941f8eb739 100644 --- a/Source/Core/Core/Src/HW/BBA-TAP/TAP_Win32.cpp +++ b/Source/Core/Core/Src/HW/BBA-TAP/TAP_Win32.cpp @@ -119,7 +119,7 @@ if(isActivated()) //set up recv event mHRecvEvent = CreateEvent(NULL, false, false, NULL); - //ZERO_OBJECT(mReadOverlapped); + memset((void*)&mReadOverlapped, 0 , sizeof(mReadOverlapped)); resume(); DEBUGPRINT("Success!\n\n"); @@ -182,12 +182,8 @@ bool CEXIETHERNET::startRecv() { DEBUGPRINT("already waiting\n"); return true; } - DWORD BytesRead = 0; - DWORD *Buffer = (DWORD *)malloc(2048); // Should be enough - DWORD res = ReadFile(mHAdapter, Buffer, BytesRead, + DWORD res = ReadFile(mHAdapter, mRecvBuffer, mRecvBuffer.size(), &mRecvBufferLength, &mReadOverlapped); - mRecvBuffer.write(BytesRead, Buffer); - free(Buffer); if(res) { //Operation completed immediately DEBUGPRINT("completed, res %i\n", res); mWaiting = true;