State: Fixed message out-of-bound during copying

This commit is contained in:
diamondburned (Forefront) 2020-05-17 13:31:08 -07:00
parent 130e60c162
commit dfcf6770c3
1 changed files with 2 additions and 0 deletions

View File

@ -472,6 +472,8 @@ func (s *DefaultStore) MessageSet(message *discord.Message) error {
} else {
// Else, append an empty message to the end.
ms = append(ms, discord.Message{})
// Increment to update the length.
end++
}
// Copy hack to prepend. This copies the 0th-(end-1)th entries to