Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix access beyond array boundaries in SpanByte #140

Merged
merged 2 commits into from
May 24, 2021

Conversation

gukoff
Copy link
Contributor

@gukoff gukoff commented May 21, 2021

Description

Fix array access similarly to how it's done in nanoframework/nanoFramework.IoT.Device#29

Motivation and Context

  • Fixes a bug

How Has This Been Tested?

Not tested.

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (work on Unit Tests, has no impact on code or features)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@gukoff
Copy link
Contributor Author

gukoff commented May 21, 2021

I think there are no tests for SpanByte in the repo. Should we add them in this PR too?

@josesimoes
Copy link
Member

Yes please! Let's have unit tests for this.

@josesimoes josesimoes requested a review from Ellerbach May 21, 2021 18:16
@josesimoes josesimoes enabled auto-merge (squash) May 24, 2021 08:36
Copy link
Member

@Ellerbach Ellerbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission. And spotting the potential issue

@josesimoes josesimoes merged commit da9c46e into nanoframework:develop May 24, 2021
@gukoff
Copy link
Contributor Author

gukoff commented Jun 1, 2021

My VS doesn't recognize the tests here, I think because there are special guidelines. I'll see if following them fixes the issue, and then look into tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants