mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 06:55:52 +08:00
makeindex() needs clear old result, add index.clear()
This commit is contained in:
@@ -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)) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user