Commit 60f957ed authored by Max Kellermann's avatar Max Kellermann

util/MimeType: use string_view::substr()

Fixes regression from commit db93bb99 because ParseMimeTypeParameters() assumed the items were null-terminated, but after that commit, they were not anymore.
parent 864d26cd
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment