Skip to content

Commit 9b15454

Browse files
committed
makeindex() needs clear old result, add index.clear()
1 parent a2911fa commit 9b15454

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

UserDB.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ bool CUserDB::makeindex(char* buf, std::unordered_map<std::string, int>& index)
104104
int i;
105105
char *p1, *p2;
106106

107+
// Remove the old index
108+
index.clear();
109+
107110
for (i = 0, p1 = tokenize(buf, &p2); p1 != NULL;
108111
i++, p1 = tokenize(p2, &p2)) {
109112

0 commit comments

Comments
 (0)