1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-12-02 20:02:53 +00:00

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

View file

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