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 Directives::Entry::string(Shared const& parent) const {
StringView result(parent.string); StringView result = parent.string;
result = result.substr(begin, length); result = result.utf8().substr(begin, length);
return result; return result;
} }

View File

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