makeindex() needs clear old result, add index.clear()

This commit is contained in:
SASANO Takayoshi 2020-03-07 16:44:50 +09:00
parent a2911fa5c3
commit 9b15454f96

View file

@ -104,6 +104,9 @@ bool CUserDB::makeindex(char* buf, std::unordered_map<std::string, int>& index)
int i;
char *p1, *p2;
// Remove the old index
index.clear();
for (i = 0, p1 = tokenize(buf, &p2); p1 != NULL;
i++, p1 = tokenize(p2, &p2)) {