Skip to content

Commit

Permalink
Bugfix: An array with a length of 1 cannot be accessed at index 1 but…
Browse files Browse the repository at this point in the history
… only at 0.
  • Loading branch information
Christian Mönius committed Jan 19, 2024
1 parent acd527a commit a261cdb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ protected byte ReadState8()
{
Span<byte> buffer = stackalloc byte[1];
i2cComms.Read(buffer);
return buffer[1];
return buffer[0];
}

/// <summary>
Expand Down

0 comments on commit a261cdb

Please sign in to comment.