From a7aff1bcf0ecd7691211a4521fb15f2450f0a864 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Thu, 2 Apr 2020 10:03:35 -0700 Subject: [PATCH] fix regression on string ops Signed-off-by: Nikolaj Bjorner --- src/ast/seq_decl_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ast/seq_decl_plugin.cpp b/src/ast/seq_decl_plugin.cpp index 78e685426..eba36b5e3 100644 --- a/src/ast/seq_decl_plugin.cpp +++ b/src/ast/seq_decl_plugin.cpp @@ -283,7 +283,7 @@ bool zstring::contains(zstring const& other) const { int zstring::indexofu(zstring const& other, unsigned offset) const { if (offset <= length() && other.length() == 0) return offset; if (offset == length()) return -1; - if (offset < other.length() + offset) return -1; + if (offset > other.length() + offset) return -1; if (other.length() + offset > length()) return -1; unsigned last = length() - other.length(); for (unsigned i = offset; i <= last; ++i) {