From 8e50eb2616fb69c50c5370022752d45a32447cb5 Mon Sep 17 00:00:00 2001 From: Tim Hutton Date: Tue, 16 Aug 2016 10:01:13 +0100 Subject: [PATCH] Fix: TimestampedReward::add was broken, causing occasional doubling of rewards. --- Malmo/src/TimestampedReward.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Malmo/src/TimestampedReward.cpp b/Malmo/src/TimestampedReward.cpp index 6a199dd3b..6e1e90930 100644 --- a/Malmo/src/TimestampedReward.cpp +++ b/Malmo/src/TimestampedReward.cpp @@ -154,7 +154,7 @@ namespace malmo void TimestampedReward::add(const TimestampedReward& other) { - for( std::map::const_iterator it = this->values.begin(); it!= this->values.end(); it++) { + for( std::map::const_iterator it = other.values.begin(); it!= other.values.end(); it++) { int dimension = it->first; double value = it->second; if( this->values.find(dimension) != this->values.end() )