Use Length instead of Position to keep thing clear

This commit is contained in:
Hongtao Zhang 2022-08-21 22:02:46 -04:00
parent 74d9290944
commit 793b432d61
No known key found for this signature in database
GPG key ID: 75F655B91C7AC9BB

View file

@ -277,7 +277,7 @@ namespace Flow.Launcher.Core.Plugin
return Stream.Null;
}
switch (sourceBuffer.Length, errorBuffer.Position)
switch (sourceBuffer.Length, errorBuffer.Length)
{
case (0, 0):
var errorMessage = Encoding.UTF8.GetString(errorBuffer.GetBuffer(), 0, (int)errorBuffer.Position);