Commit b80456a5 for libheif
commit b80456a5ce7f91700d84bc8443a4221c8d1ae116
Author: Dirk Farin <dirk.farin@gmail.com>
Date: Thu Dec 25 21:59:45 2025 +0100
fix 'starts_with()'
diff --git a/libheif/error.cc b/libheif/error.cc
index 4b5d5264..32da1e5e 100644
--- a/libheif/error.cc
+++ b/libheif/error.cc
@@ -61,7 +61,8 @@ static bool starts_with(const std::string& str, const std::string& prefix) {
if (str.length() < prefix.length()) {
return false;
}
- return str.rfind(prefix, 0) == 0;
+
+ return str.compare(0, prefix.size(), prefix) == 0;
}