Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The following lines:
List larger = (primTermsA.size() > primTermsB.size()) ? primTermsA
: primTermsB;
List smaller = (primTermsA.size() < primTermsB.size()) ? primTermsA
: primTermsB;
Will cause larger and smaller to both be set to primTermsB when the lists are of the same size. This can be solved by changing one of the comparisons to either >= or <=, or (perhaps more ideally for readability) making the statements in an if block.