diff --git a/src/ast/sls/sls_seq_plugin.cpp b/src/ast/sls/sls_seq_plugin.cpp index 85f1b5289..3f09f3792 100644 --- a/src/ast/sls/sls_seq_plugin.cpp +++ b/src/ast/sls/sls_seq_plugin.cpp @@ -694,7 +694,7 @@ namespace sls { hashtable> set; set.insert(zstring("")); for (unsigned i = 0; i < val_other.length(); ++i) { - for (unsigned j = val_other.length(); j-- > 0; ) { + for (unsigned j = val_other.length() - i; j-- > 0; ) { zstring sub = val_other.extract(i, j); if (set.contains(sub)) break; diff --git a/src/util/parray.h b/src/util/parray.h index bc3c4adbe..1a51a8b56 100644 --- a/src/util/parray.h +++ b/src/util/parray.h @@ -414,6 +414,7 @@ public: void push_back(ref & r, value const & v) { if (r.m_ref == nullptr) mk(r); + SASSERT(r.m_ref); if (r.root()) { if (r.unshared()) { rpush_back(r.m_ref, v);