From 4abe952f600611b382980faee3d4d1295ae1dd3d Mon Sep 17 00:00:00 2001 From: Adrian Soundy Date: Sat, 14 Apr 2018 00:43:25 +1200 Subject: [PATCH] Fix problem on SerialPort ReadBufferAsync (#132) --- .../PortSerial/SerialPort.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/nanoFramework.Tools.DebugLibrary.Shared/PortSerial/SerialPort.cs b/source/nanoFramework.Tools.DebugLibrary.Shared/PortSerial/SerialPort.cs index 3b36b0b1..f0aad069 100644 --- a/source/nanoFramework.Tools.DebugLibrary.Shared/PortSerial/SerialPort.cs +++ b/source/nanoFramework.Tools.DebugLibrary.Shared/PortSerial/SerialPort.cs @@ -706,7 +706,7 @@ public async Task ReadBufferAsync(uint bytesToRead, TimeSpan waiTimeout, if (bytesRead > 0) { - byte[] readBuffer = new byte[bytesToRead]; + byte[] readBuffer = new byte[bytesRead]; inputStreamReader?.ReadBytes(readBuffer); return readBuffer;