- if (threads[threadID].splitPoint->pvNode)
- sp_search<PV>(threads[threadID].splitPoint, threadID);
+ // Here we call search() with SplitPoint template parameter set to true
+ SplitPoint* tsp = threads[threadID].splitPoint;
+ Position pos(*tsp->pos, threadID);
+ SearchStack* ss = tsp->sstack[threadID] + 1;
+ ss->sp = tsp;
+
+ if (tsp->pvNode)
+ //search<PV, true>(pos, ss, tsp->alpha, tsp->beta, tsp->depth, tsp->ply);
+ sp_search<PV>(pos, ss, tsp->alpha, tsp->beta, tsp->depth, tsp->ply);