From 78f2ed2544440ea143873918f45b30a331f00383 Mon Sep 17 00:00:00 2001 From: notxor Date: Mon, 19 Feb 2024 08:13:48 +0100 Subject: [PATCH] Fix negative unsigned loop index --- src/solver/BestResponse.cpp | 2 +- src/solver/PCfrSolver.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/solver/BestResponse.cpp b/src/solver/BestResponse.cpp index 409882a..90d174b 100644 --- a/src/solver/BestResponse.cpp +++ b/src/solver/BestResponse.cpp @@ -415,7 +415,7 @@ BestResponse::showdownBestResponse(shared_ptr node, int player,con vector card_winsum(52); for(std::size_t i = 0;i < card_winsum.size();i ++) card_winsum[i] = 0; - std::size_t j = 0; + int j = 0; //if(player_combs.length != oppo_combs.length) throw new RuntimeException(""); for(std::size_t i = 0;i < player_combs.size();i ++){ diff --git a/src/solver/PCfrSolver.cpp b/src/solver/PCfrSolver.cpp index c30ae6b..29395ed 100644 --- a/src/solver/PCfrSolver.cpp +++ b/src/solver/PCfrSolver.cpp @@ -607,7 +607,7 @@ PCfrSolver::showdownUtility(int player, shared_ptr node, const vec vector card_winsum = vector (52);//node->card_sum; fill(card_winsum.begin(),card_winsum.end(),0); - std::size_t j = 0; + int j = 0; for(std::size_t i = 0;i < player_combs.size();i ++){ const RiverCombs& one_player_comb = player_combs[i]; while (j < oppo_combs.size() && one_player_comb.rank < oppo_combs[j].rank){