- // Search should be limited by nodes, time or depth ?
- if (valType == "nodes")
- limits.maxNodes = atoi(valStr.c_str());
- else if (valType == "time")
- limits.maxTime = 1000 * atoi(valStr.c_str()); // maxTime is in ms
+ if (limitType == "time")
+ limits.movetime = 1000 * atoi(limit.c_str()); // movetime is in ms
+
+ else if (limitType == "nodes")
+ limits.nodes = atoi(limit.c_str());
+