Skip to content

Commit

Permalink
🐛 Kraken: Fix image transfer if image size is exactly 2MB.
Browse files Browse the repository at this point in the history
  • Loading branch information
hexawyz committed Feb 8, 2025
1 parent abf29e7 commit 16c783c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public async Task UploadImageAsync(KrakenImageFormat imageFormat, ReadOnlyMemory
await _deviceStream.WritePipeAsync(0, _pipeAddress, MemoryMarshal.CreateFromPinnedArray(_uploadSetupMessage, 0, _uploadSetupMessage.Length), cancellationToken).ConfigureAwait(false);
while (true)
{
if (memory.Length < PacketSize)
if (memory.Length <= PacketSize)
{
await _deviceStream.WritePipeAsync(0, _pipeAddress, memory, cancellationToken).ConfigureAwait(false);
return;
Expand Down

0 comments on commit 16c783c

Please sign in to comment.