Skip to content

Commit

Permalink
Correct a off by one error
Browse files Browse the repository at this point in the history
  • Loading branch information
bastien-roucaries committed Feb 1, 2015
1 parent 8b4ae62 commit 64ad184
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qucs-core/src/history.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void history::drop (void) {
r += this->unused ();
if (r >= 2)
r -= 2;
r = std::min(r,this->values->size());
r = std::min(r,this->values->size()-1);
if (r > 127)
/* erase the first r value */
this->values->erase(this->values->begin(),this->values->begin()+r);
Expand Down

0 comments on commit 64ad184

Please sign in to comment.