Skip to content

Conversation

crabcrabcam
Copy link
Contributor

Fix for #81 on upstream. Thank you Des for the help

Loomeh
Loomeh previously approved these changes Sep 29, 2025
They weren't saving because they weren't being checked individually for not being 0 or llongmax
EXtremeExploit
EXtremeExploit previously approved these changes Oct 9, 2025
Copy link
Collaborator

@EXtremeExploit EXtremeExploit left a comment

Choose a reason for hiding this comment

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

i have no idea whats happening but i guess its ok

@EXtremeExploit
Copy link
Collaborator

by the way, the commit's email is not connected to your github account (they appear as anonymously named commits)

Comment on lines 422 to 434
// Only save the split if it's above 0. Otherwise it's impossible to beat 0
if (game->split_times[i] != 0 && game->split_times[i] != LLONG_MAX) {
ls_time_string_serialized(str, game->split_times[i]);
json_object_set_new(split, "time", json_string(str));
}
if (game->best_splits[i] == 0 && game->best_splits[i] != LLONG_MAX) {
ls_time_string_serialized(str, game->best_splits[i]);
json_object_set_new(split, "best_time", json_string(str));
}
if (game->best_segments[i] != 0 && game->best_segments[i] != LLONG_MAX) {
ls_time_string_serialized(str, game->best_segments[i]);
json_object_set_new(split, "best_segment", json_string(str));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your comment says you're checking if the split time is above zero but it only checks if the split time is not equal to zero (same with checking if it's below LLONG_MAX). Even if this is unlikely to cause any issues with use of the program, it would probably be better for this to be changed to a greater than > and less than < check to avoid issues in the future.

@EXtremeExploit EXtremeExploit merged commit 3829b06 into wins1ey:main Oct 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants