// When we see a choice list shorter than the upper bound, e.g., [3,2] for choices 0,1,2, and 3,
// then we have to pad the beginning before we store it, because [3,2] actually means [0,1,3,2]
// When we see a choice list shorter than the upper bound, e.g., [3,2] for choices 0,1,2, and 3,
// then we have to pad the beginning before we store it, because [3,2] actually means [0,1,3,2]
- // First, calculate the difference between this choice list and the upper bound
- // The actual list doesn't include '-1' at the end
- int actualListLength = newChoiceList.length - 1;
+ int actualListLength = newChoiceList.length;
int diff = maxUpperBound - actualListLength;
StringBuilder sb = new StringBuilder();
// Pad the beginning if necessary
int diff = maxUpperBound - actualListLength;
StringBuilder sb = new StringBuilder();
// Pad the beginning if necessary