Zeugma440 / atldotnet

Fully managed, portable and easy-to-use C# library to read and edit audio data and metadata (tags) from various audio formats, playlists and CUE sheets
MIT License
440 stars 60 forks source link

LyricsPhrase - Fix NullReferenceException #223

Closed nlogozzo closed 10 months ago

nlogozzo commented 10 months ago

Just tested 5.0.4 and I get a NullReferenceException using IndexOf for SyncrhonizedLyrics because of an issue of equality operators in LyricsPhrase...this PR fixes that.

Sorry I should've caught this earlier 🙃

Hotfix release needed please :)

codecov[bot] commented 10 months ago

Codecov Report

Patch coverage has no change and project coverage change: +0.01% :tada:

Comparison is base (0bc4513) 89.11% compared to head (81cd476) 89.12%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #223 +/- ## ========================================== + Coverage 89.11% 89.12% +0.01% ========================================== Files 93 93 Lines 18733 18730 -3 Branches 2757 2758 +1 ========================================== Hits 16694 16694 + Misses 1473 1470 -3 Partials 566 566 ``` | [Files Changed](https://app.codecov.io/gh/Zeugma440/atldotnet/pull/223?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [ATL/Entities/LyricsInfo.cs](https://app.codecov.io/gh/Zeugma440/atldotnet/pull/223?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-QVRML0VudGl0aWVzL0x5cmljc0luZm8uY3M=) | `80.50% <0.00%> (+1.99%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Zeugma440 commented 10 months ago

Wait a sec, I'm not dropping .NET Core and .NET Standard in such a hurry 😅 There are many other projects that use ATL through these. We have to think of another solution.

PS : it's already way past nighttime in my timezone; I'll have to take a nap.

nlogozzo commented 10 months ago

Wait a sec, I'm not dropping .NET Core and .NET Standard in such a hurry 😅 There are many other projects that use ATL through these. We have to think of another solution.

PS : it's already way past nighttime in my timezone; I'll have to take a nap.

We could make everything nullable...but that'd be a huge amount of work... let me see how else i can maybe rewrite this equals stuff

nlogozzo commented 10 months ago

Ok fixed, used ReferencesEquals for checking null instead.

Restored .NET 3.1 and Standard 2.1

Good to go now!

sonarcloud[bot] commented 10 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. Read more here

Zeugma440 commented 10 months ago

Good to go here too~ Thanks for your understanding

Zeugma440 commented 10 months ago

Made some unit tests for all this new code to be covered. Ready for release!

nlogozzo commented 10 months ago

Ready for release!

:)

Zeugma440 commented 10 months ago

Almost there~ Should be out in 2 hours tops

nlogozzo commented 10 months ago

Almost there~ Should be out in 2 hours tops

No worries...thank you :))

Zeugma440 commented 10 months ago

Done! Enjoy v5.05 😁