浏览代码

test-fix: empty filters

Sam Jaffe 1 年之前
父节点
当前提交
271b06fcbf
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tests/selfvalidate_test.cxx

+ 1 - 1
tests/selfvalidate_test.cxx

@@ -125,7 +125,7 @@ protected:
       size_t const neg_start =
           pos_end == 0 ? 1 : (pos_end == std::string::npos ? pos_end : pos_end + 2);
 
-      if (pos_end > 0) {
+      if (pos_end > 0 && not str.empty()) {
         tokenize(ptr->whitelist, std::string(str.substr(0, pos_end)));
       }
       if (neg_start != std::string::npos) {