Skip to content

Commit

Permalink
bugfix: assertion failure in Population.size()
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Nov 14, 2018
1 parent 03e44fc commit 3212d52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/src/main/java/jme3utilities/evo/Population.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2017, Stephen Gold
Copyright (c) 2017-2018, Stephen Gold
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -395,7 +395,7 @@ public void setCapacity(int newCapacity) {
public int size() {
assert numElements >= 0 : numElements;
assert numElements <= capacity : numElements;
assert numElements <= elementsByFitness.size() : numElements;
assert numElements >= elementsByFitness.size() : numElements;
return numElements;
}

Expand Down

0 comments on commit 3212d52

Please sign in to comment.