From cf2258a536287cb13cefb882e1277a035d715996 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Thu, 26 Apr 2018 08:39:35 +0200 Subject: [PATCH] fix #1594 Signed-off-by: Nikolaj Bjorner --- src/ast/seq_decl_plugin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ast/seq_decl_plugin.cpp b/src/ast/seq_decl_plugin.cpp index b592b719a..381339768 100644 --- a/src/ast/seq_decl_plugin.cpp +++ b/src/ast/seq_decl_plugin.cpp @@ -256,6 +256,7 @@ bool zstring::contains(zstring const& other) const { int zstring::indexof(zstring const& other, int offset) const { SASSERT(offset >= 0); + if (static_cast(offset) <= length() && other.length() == 0) return offset; if (static_cast(offset) == length()) return -1; if (other.length() + offset > length()) return -1; unsigned last = length() - other.length();