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:
parent
864d26cd1b
commit
60f957ed64
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue