commit 24c2fd2ffa582ea83172184b1da2816555340a01
parent 30020c71ecaa0cac5d1604503dd2d9ecfe2d161d
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Fri, 25 Apr 2025 14:59:36 +0200
Fixed cpp adapter for 0-moves solutions
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cpp/nissy.cpp b/cpp/nissy.cpp
@@ -179,7 +179,8 @@ namespace nissy {
std::string_view strsols(csols.data());
for (auto r : strsols | std::views::split('\n'))
- if (r.begin() != r.end())
+ if (r.begin() != r.end() ||
+ r.begin() == strsols.begin())
result.solutions.push_back(
std::string{r.begin(), r.end()});