- // Copy the current search stack to the master thread
- memcpy(splitPoint->sstack[master], sstck, (ply+1) * sizeof(SearchStack));
+ // Detach splitPoint Position from the master one
+ splitPoint->pos.detach();
+
+ // Copy the tail of current search stack to the master thread
+ memcpy(splitPoint->sstack[master] + ply - 1, sstck + ply - 1, 3 * sizeof(SearchStack));