Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-26 01:51:57 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-26 01:51:57 +1000
commit500e81329a411b3a6df6e300beab68418dc00658 (patch)
tree3f4fcb7601f1597a9562b4986a2f1d654e8d1c36
parent09d26d43b5262f480fd55eab9980eff06a71edbb (diff)
Fix minor issues
-rw-r--r--source/core/StarDirectives.cpp4
-rw-r--r--source/core/StarImageProcessing.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/source/core/StarDirectives.cpp b/source/core/StarDirectives.cpp
index fd4ee46..7149f70 100644
--- a/source/core/StarDirectives.cpp
+++ b/source/core/StarDirectives.cpp
@@ -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;
}
diff --git a/source/core/StarImageProcessing.cpp b/source/core/StarImageProcessing.cpp
index 0330a2d..8473975 100644
--- a/source/core/StarImageProcessing.cpp
+++ b/source/core/StarImageProcessing.cpp
@@ -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);