util/MimeType: use string_view::substr()

Fixes regression from commit db93bb996c because
ParseMimeTypeParameters() assumed the items were null-terminated, but
after that commit, they were not anymore.
This commit is contained in:
Max Kellermann 2020-05-06 20:32:23 +02:00
parent 864d26cd1b
commit 60f957ed64
1 changed files with 2 additions and 2 deletions

View File

@ -45,8 +45,8 @@ ParseMimeTypeParameters(const char *s) noexcept
if (eq == i.npos)
continue;
result.insert(std::make_pair(std::string(&i.front(), eq),
std::string(&i[eq + 1])));
result.insert(std::make_pair(i.substr(0, eq),
i.substr(eq + 1)));
}
return result;