Files
ly/ly-ui
matcxzandMatheus C. 55de3bc26c fix: prevent underflow when session list is empty (#1060)
## What are the changes about?
Fixes an integer underflow in `min_session_index`, which was computed by subtracting 1 from the session list length without checking for zero. Caused a panic (Debug/ReleaseSafe) or wraparound (ReleaseFast) on installs with no available sessions.

## What existing issue(s) does this resolve?
N/A

## Pre-requisites
- [x] I have tested & confirmed the changes work locally
- [x] I have read and fully adhere to the rules set in the contributing guidelines found in `CONTRIBUTING.md`

Co-authored-by: Matheus C. <245040149+matheusc457@users.noreply.github.com>
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1060
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
2026-09-30 17:19:38 +02:00
..
2026-07-07 11:51:05 +02:00