Calculate the stage changes correctly

git-svn-id: http://webgoat.googlecode.com/svn/trunk@161 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
rogan.dawes
2007-07-11 12:52:23 +00:00
parent 851974d7ce
commit cb794dcb50
2 changed files with 2 additions and 3 deletions

View File

@ -924,7 +924,7 @@ public class WebSession
RandomLessonAdapter rla = (RandomLessonAdapter) al;
int stage = myParser.getIntParameter(STAGE) - 1;
String[] stages = rla.getStages();
if (stage>0 && stage <= stages.length)
if (stage>=0 && stage < stages.length)
rla.setStage(this, stages[stage]);
} catch (ParameterNotFoundException pnfe) {}
}