You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: prevent index out of range panic in chat ls command (issue iyear#1112) (iyear#1115)
* fix: prevent index out of range panic in chat ls command
- Added length check before accessing topics.Messages slice
- Prevents panic when topics.Messages is empty (length 0)
- Fixes 'index out of range [-1]' error in fetchTopics function
The bug occurred at line 286 where topics.Messages[len(topics.Messages)-1]
was accessed without checking if the slice was empty first.
When the slice is empty, len-1 equals -1, causing a panic.
Fixesiyear#1122
* fix: panic index out of range in fetchTopics
0 commit comments