Commit c22a0818 authored by Adam P. Goucher's avatar Adam P. Goucher

Improvements to stdin symmetry

parent b73e7095
Pipeline #45916854 passed with stages
in 7 minutes and 23 seconds
......@@ -183,8 +183,13 @@ namespace apg {
std::vector<bitworld> hashsoup(std::string prehash, std::string full_symmetry) {
if (full_symmetry.find("stdin") != std::string::npos) {
std::string rle = prehash.substr(prehash.find('-'));
return rle2vec(rle);
auto pos = prehash.find('-');
if (pos == std::string::npos) {
return hashsoup(prehash, "C1");
} else {
std::string rle = prehash.substr(pos);
return rle2vec(rle);
}
}
std::string symmetry = full_symmetry;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment