Browse Source

test-fix: empty filters

Sam Jaffe 1 năm trước cách đây
mục cha
commit
271b06fcbf
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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) {