Fix off by one error in random loading text #1

Merged
mewrrythekibby merged 1 commit from off-by-one-bugfix into main 2025-11-16 03:12:48 +00:00

The random loading text had an off by one error where there was a chance it would interpret the newline at the end of the file as a separator, leaving one extra element in the array -- a blank one. Instead of removing this final element, I have simply modified the random function to ignore the final element. A more proper fix would be much larger, and since this variable is only used here, I thought this was an appropriate course of action.

There is also an error message now, in case this bug does reappear later on.

The random loading text had an off by one error where there was a chance it would interpret the newline at the end of the file as a separator, leaving one extra element in the array -- a blank one. Instead of removing this final element, I have simply modified the random function to ignore the final element. A more proper fix would be much larger, and since this variable is only used here, I thought this was an appropriate course of action. There is also an error message now, in case this bug does reappear later on.
magdalunaa was assigned by mewrrythekibby 2025-11-16 02:32:44 +00:00
mewrrythekibby added 1 commit 2025-11-16 02:32:45 +00:00
magdalunaa was unassigned by mewrrythekibby 2025-11-16 03:12:14 +00:00
Author
Owner

Just gonna merge; ceres said LGTM

Just gonna merge; ceres said LGTM
mewrrythekibby merged commit 724d9fbe4b into main 2025-11-16 03:12:48 +00:00
mewrrythekibby deleted branch off-by-one-bugfix 2025-11-16 03:12:56 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: linuxposting/tilde-site#1
No description provided.