Skip to content

Commit

Permalink
Prevent an assertion in debug mode.
Browse files Browse the repository at this point in the history
RANDOM_ROTATION checks that the rotation is unset, so don't set
a default value of 0. Fix one caller that was calling DIRECT without
an orientation set.
  • Loading branch information
gcp committed Oct 25, 2017
1 parent ee2ad8e commit dfe2cd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/GTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ bool GTP::execute(GameState & game, std::string xinput) {
} else if (command.find("heatmap") == 0) {
gtp_printf(id, "");
auto vec = Network::get_scored_moves(
&game, Network::Ensemble::DIRECT);
&game, Network::Ensemble::DIRECT, 0);
Network::show_heatmap(&game, vec, false);
return true;
} else if (command.find("fixed_handicap") == 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/Network.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Network {

static Netresult get_scored_moves(GameState * state,
Ensemble ensemble,
int rotation = 0);
int rotation = -1);
static constexpr int INPUT_CHANNELS = 18;
static constexpr int MAX_CHANNELS = 256;

Expand Down

0 comments on commit dfe2cd6

Please sign in to comment.