浏览代码

fix: anchoring

Sam Jaffe 1 年之前
父节点
当前提交
9d81292ef6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/jvalidate/schema.h

+ 1 - 1
include/jvalidate/schema.h

@@ -130,7 +130,7 @@ private:
     if (auto it = anchors_.find(ref.anchor()); it != anchors_.end()) {
     if (auto it = anchors_.find(ref.anchor()); it != anchors_.end()) {
       ref = it->second / ref.pointer();
       ref = it->second / ref.pointer();
     }
     }
-    EXPECT_M(ref.anchor().back() != '#', "Unmatched anchor: " << ref.anchor());
+    EXPECT_M(ref.anchor().back() == '#', "Unmatched anchor: " << ref.anchor());
 
 
     if (auto it = alias_cache_.find(ref); it != alias_cache_.end()) {
     if (auto it = alias_cache_.find(ref); it != alias_cache_.end()) {
       return it->second;
       return it->second;