diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-07-28 02:20:46 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-07-28 02:20:46 +0100 |
commit | fdc9111c511bb75b17de92440a915f1b04175e22 (patch) | |
tree | 210a6cbfe3024b230d236f6447fdf4219bd1583a | |
parent | Remove use of deprecated std::iterator (diff) | |
download | slicer-fdc9111c511bb75b17de92440a915f1b04175e22.tar.bz2 slicer-fdc9111c511bb75b17de92440a915f1b04175e22.tar.xz slicer-fdc9111c511bb75b17de92440a915f1b04175e22.zip |
Fix length check in Metadata::in_scope
-rw-r--r-- | slicer/slicer/metadata.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/slicer/slicer/metadata.h b/slicer/slicer/metadata.h index 73e351c..6b209ae 100644 --- a/slicer/slicer/metadata.h +++ b/slicer/slicer/metadata.h @@ -97,7 +97,7 @@ namespace Slicer { static constexpr inline auto in_scope(std::string_view md, std::string_view scope) { - return ((md.length() == scope.length() || (md.length() >= scope.length() && md[scope.length()] == ':')) + return ((md.length() == scope.length() || (md.length() > scope.length() && md[scope.length()] == ':')) && md.compare(0, scope.length(), scope) == 0); } |