Allow empty bitboards in config
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 25 Aug 2023 17:44:22 +0000 (19:44 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 25 Aug 2023 17:44:22 +0000 (19:44 +0200)
src/parser.cpp

index 9be7e00..a39cf39 100644 (file)
@@ -114,7 +114,7 @@ namespace {
         int rank;
         std::stringstream ss(value);
         target = 0;
-        while (!ss.eof() && ss >> file && ss >> rank)
+        while (!ss.eof() && ss >> file && file != '-' && ss >> rank)
         {
             if (Rank(rank - 1) > RANK_MAX || (file != '*' && File(tolower(file) - 'a') > FILE_MAX))
                 return false;