major bugfix in ID(used to pass SearchParams as reference)

This commit is contained in:
rektdie committed 2024-10-15 19:07:25 +02:00
1 parent 5bf50af74b
commit cdbf9d4b28
5 files changed
+10 -9

No files matched your search

+2 -2
View File
@@ -146,7 +146,7 @@ static int ReadParam(std::string param, std::string &command) {
std::string result = "";
pos += param.length() + 1;
while(pos <= command.length() && std::isdigit(command[pos])){
while(pos < command.length() && std::isdigit(command[pos])){
result += command[pos];
pos++;
}
@@ -165,7 +165,7 @@ void ParseGo(Board &board, std::string &command) {
params.binc = ReadParam("binc", command);
params.movesToGo = ReadParam("movestogo", command);
auto worker = std::thread(SearchPosition, std::ref(board), std::ref(params));
auto worker = std::thread(SearchPosition, std::ref(board), params);
worker.detach();
}