From fcb02c67748678e317cac58f7e43c3ed83860ad9 Mon Sep 17 00:00:00 2001 From: Gloria Mundi Date: Thu, 20 Nov 2025 17:49:40 +0100 Subject: fix minor errors in tests --- test/string/suffixTree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/string') diff --git a/test/string/suffixTree.cpp b/test/string/suffixTree.cpp index 6f3d912..fd2f5ea 100644 --- a/test/string/suffixTree.cpp +++ b/test/string/suffixTree.cpp @@ -19,7 +19,7 @@ void stress_test() { auto dfs = [&](auto&& self, string pref, ll node) -> void { auto& [l, r, _, next] = st.tree[node]; if (l >= 0) pref += s.substr(l, r - l); - if (pref.back() == '#') got[n + 1 - ssize(pref)] = pref; + if (!pref.empty() && pref.back() == '#') got[n + 1 - ssize(pref)] = pref; for (auto [__, j] : next) { self(self, pref, j); } -- cgit v1.2.3