Fix minor issues

This commit is contained in:
Kae 2023-06-26 01:51:57 +10:00
parent 09d26d43b5
commit 500e81329a
2 changed files with 4 additions and 3 deletions

View File

@ -25,8 +25,8 @@ Directives::Entry::Entry(Entry const& other) {
}
StringView Directives::Entry::string(Shared const& parent) const {
StringView result(parent.string);
result = result.substr(begin, length);
StringView result = parent.string;
result = result.utf8().substr(begin, length);
return result;
}

View File

@ -150,7 +150,8 @@ ImageOperation imageOperationFromString(StringView string) {
try {
List<StringView> bits;
string.forEachSplitAnyView("=;", [&](StringView split, size_t, size_t) {
bits.emplace_back(split);
if (!split.empty())
bits.emplace_back(split);
});
String type = bits.at(0);