Skip to content

Conversation

@haslinghuis
Copy link
Member

Fixes: #2330

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

return Math.floor(Math.random() * Math.floor(count));
}

const STICK_OVERLAY_SPRITE = [
Copy link
Member

Choose a reason for hiding this comment

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

While this is an improvement, I can not see how this scope change will fix any bugs. Can you explain please?

Copy link
Member Author

@haslinghuis haslinghuis Dec 12, 2020

Choose a reason for hiding this comment

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

The array that's build up in this function had undefined symbols. At first I tried to chase charCode but that was only a subsequent behavior. So very strange I found out that the array I moved was undefined within the function although it was a constant declared outside the block scope.

Cause: SYM.loadSymbols() is not initialized before line 2240 occurs and after the const was created.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure how this move is relating to SYM.loadSymbols(), as it is not connected in any way. But the change of scope makes sense, so good to go.

@mikeller mikeller added this to the 10.8.0 milestone Dec 13, 2020
@mikeller mikeller merged commit 8b006c4 into betaflight:master Dec 13, 2020
@haslinghuis haslinghuis deleted the fix_osd_preview branch December 13, 2020 22:32
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.

OSD Preview is not rendered

2 participants