mirror of https://github.com/g4klx/MMDVMHost
makeindex() needs clear old result, add index.clear()
This commit is contained in:
parent
a2911fa5c3
commit
9b15454f96
|
|
@ -104,6 +104,9 @@ bool CUserDB::makeindex(char* buf, std::unordered_map<std::string, int>& index)
|
||||||
int i;
|
int i;
|
||||||
char *p1, *p2;
|
char *p1, *p2;
|
||||||
|
|
||||||
|
// Remove the old index
|
||||||
|
index.clear();
|
||||||
|
|
||||||
for (i = 0, p1 = tokenize(buf, &p2); p1 != NULL;
|
for (i = 0, p1 = tokenize(buf, &p2); p1 != NULL;
|
||||||
i++, p1 = tokenize(p2, &p2)) {
|
i++, p1 = tokenize(p2, &p2)) {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue