terrakok / Cicerone

🚦 Cicerone is a lightweight library that makes the navigation in an Android app easy.
Other
2.58k stars 218 forks source link

Fix error in Router.java #82

Closed qwert2603 closed 6 years ago

qwert2603 commented 6 years ago

I make call: router.newRootChain(new ScreenOne(), new ScreenTwo()); and get a exception

java.lang.ArrayIndexOutOfBoundsException: length=2; index=2
at ru.terrakok.cicerone.Router.newRootChain(Router.java:91)
at ...

I suppose, iteration bound must be equal to length of array screens (not commands).

terrakok commented 6 years ago

Yes! Thank you!