Skip to content

Commit

Permalink
Fixed compiler errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpldgr committed Nov 10, 2024
1 parent f773382 commit 4e2f780
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/movegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

namespace Stockfish {

size_t MAX_MOVES = 1024;
int MAX_MOVES = 1024;
size_t moveListSize = sizeof(ExtMove) * MAX_MOVES;

namespace {
Expand Down
6 changes: 3 additions & 3 deletions src/movepick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHist

#ifdef USE_HEAP_INSTEAD_OF_STACK_FOR_MOVE_LIST
this->moves = (ExtMove*)malloc(moveListSize);
if (this->moveList == 0)
if (this->moves == 0)
{
printf("Error: Failed to allocate memory in heap.");
exit(1);
Expand All @@ -90,7 +90,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHist

#ifdef USE_HEAP_INSTEAD_OF_STACK_FOR_MOVE_LIST
this->moves = (ExtMove*)malloc(moveListSize);
if (this->moveList == 0)
if (this->moves == 0)
{
printf("Error: Failed to allocate memory in heap.");
exit(1);
Expand All @@ -112,7 +112,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Value th, const GateHistory*

#ifdef USE_HEAP_INSTEAD_OF_STACK_FOR_MOVE_LIST
this->moves = (ExtMove*)malloc(moveListSize);
if (this->moveList == 0)
if (this->moves == 0)
{
printf("Error: Failed to allocate memory in heap.");
exit(1);
Expand Down

0 comments on commit 4e2f780

Please sign in to comment.