diff options
Diffstat (limited to 'lib/msgstore.go')
-rw-r--r-- | lib/msgstore.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go index bd347893..a0da2d81 100644 --- a/lib/msgstore.go +++ b/lib/msgstore.go @@ -191,9 +191,9 @@ func (store *MessageStore) Update(msg types.WorkerMessage) { } uids := make([]uint32, len(store.Uids)-len(msg.Uids)) j := 0 - for i, uid := range store.Uids { - if _, deleted := toDelete[uid]; !deleted { - uids[j] = store.Uids[i] + for _, uid := range store.Uids { + if _, deleted := toDelete[uid]; !deleted && j < len(uids) { + uids[j] = uid j += 1 } } |