xyonico/BeatSaberSongLoader

BPM loaded incorrectly - e.g. 1.2815E+16

Closed this issue · 4 comments

Version:
Beat Saber v0.11.1
Song Loader 4.2

How to reproduce:

  1. Download Waiting for love - Avicii
  2. Play the song
  3. All notes skip you or run into you at the very beginning

image

Possible cause:
BPM is set to a float
"_beatsPerMinute":128.14999389648438,

The value seems to be off by the factor 10^14 while the digits are the same as in the json file.

This has been fixed with this commit 7af0d1f

The problem was I wasn't stating a specific culture when converting the text to number, so for some system languages a decimal is separated with commas instead of periods.

I'll close this issue when the release is out.

Thank you 👍
I know that problem from my .NET projects :/

PS: Sorry for the duplicate issue 🙈