summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/msgstore.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index bd34789..a0da2d8 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
 			}
 		}
bit.com> 2010-02-15 21:57:21 +0100 committer hut <hut@lavabit.com> 2010-02-15 21:57:21 +0100 added guidelines on code modification' href='/akspecs/ranger/commit/HACKING?h=v1.7.0&id=f8f6f7f94b3c0a1da2d8abb38cf23ca127dd28a4'>f8f6f7f9 ^
1881922f ^




f61fbfae ^
1881922f ^



7bf5f967 ^
1881922f ^

f8f6f7f9 ^



f61fbfae ^
f8f6f7f9 ^


f61fbfae ^
f8f6f7f9 ^
eb7b0a7b ^
f8f6f7f9 ^




f8f6f7f9 ^

29028631 ^

f61fbfae ^


f8f6f7f9 ^
f8f6f7f9 ^
f61fbfae ^

f8f6f7f9 ^


f8f6f7f9 ^




7bf5f967 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74