aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-04-25 14:59:36 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-04-25 14:59:36 +0200
commit24c2fd2ffa582ea83172184b1da2816555340a01 (patch)
tree9c7ab816573738bffd02561653f3eb81857ead7b
parent30020c71ecaa0cac5d1604503dd2d9ecfe2d161d (diff)
downloadnissy-core-24c2fd2ffa582ea83172184b1da2816555340a01.tar.gz
nissy-core-24c2fd2ffa582ea83172184b1da2816555340a01.zip
Fixed cpp adapter for 0-moves solutions
Diffstat (limited to '')
-rw-r--r--cpp/nissy.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/nissy.cpp b/cpp/nissy.cpp
index 3c41733..118a072 100644
--- a/cpp/nissy.cpp
+++ b/cpp/nissy.cpp
@@ -179,7 +179,8 @@ namespace nissy {
179 179
180 std::string_view strsols(csols.data()); 180 std::string_view strsols(csols.data());
181 for (auto r : strsols | std::views::split('\n')) 181 for (auto r : strsols | std::views::split('\n'))
182 if (r.begin() != r.end()) 182 if (r.begin() != r.end() ||
183 r.begin() == strsols.begin())
183 result.solutions.push_back( 184 result.solutions.push_back(
184 std::string{r.begin(), r.end()}); 185 std::string{r.begin(), r.end()});
185 186

Generated with cgit - Back to sebastiano.tronto.net