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

Don't use Floats to parse "extended" Time Spans #772

Merged
merged 1 commit into from
Feb 11, 2024

Conversation

CryZe
Copy link
Collaborator

@CryZe CryZe commented Feb 11, 2024

When parsing the splits files we still accidentally used floats to parse the extended notation that contains the number of days. It really only was used for the amount of days and as far as I can tell never allowed for any fractional values anyways. However, it almost certainly allowed values such as NaN or Inf, which probably would've caused a panic.

@CryZe CryZe added bug There is a bug. enhancement An improvement for livesplit-core. performance Affects the performance of the code. parsing This is about one of the parsers. labels Feb 11, 2024
@CryZe CryZe added this to the v0.14 milestone Feb 11, 2024
@CryZe CryZe force-pushed the days-in-time-span-no-floats branch from 31ac1a6 to 48b099e Compare February 11, 2024 19:16
When parsing the splits files we still accidentally used floats to parse
the extended notation that contains the number of days. It really only
was used for the amount of days and as far as I can tell never allowed
for any fractional values anyways. However, it almost certainly allowed
values such as `NaN` or `Inf`, which probably would've caused a panic.
@CryZe CryZe force-pushed the days-in-time-span-no-floats branch from 48b099e to e1beec5 Compare February 11, 2024 19:36
@CryZe CryZe merged commit 351068a into LiveSplit:master Feb 11, 2024
71 checks passed
@CryZe CryZe deleted the days-in-time-span-no-floats branch February 11, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug There is a bug. enhancement An improvement for livesplit-core. parsing This is about one of the parsers. performance Affects the performance of the code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant