MelbourneDeveloper / Device.Net

A C# cross platform connected device framework
MIT License
628 stars 121 forks source link

Fix for Issue #199: System.ArgumentOutOfRangeException "Positive number required" #218

Closed brendonparker closed 3 years ago

brendonparker commented 3 years ago

Fixes issue #199 If the device returns a write buffer length of zero, the FileStream is openned with a writeBufferSize of zero which throws

System.ArgumentOutOfRangeException "Positive number required"

This change will return Stream.Null in that scenario.

brendonparker commented 3 years ago

Closing PR, as suggested fix isn't acceptable