| Summary: | Input cards choices error | ||
|---|---|---|---|
| Product: | Group6 | Reporter: | Chan Tai To <taitochan2-c> |
| Component: | Cards | Assignee: | Chan Tai To <taitochan2-c> |
| Status: | CONFIRMED --- | ||
| Severity: | critical | ||
| Priority: | --- | ||
| Version: | unspecified | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Attachments: | java.lang.StringIndexOutOfBoundsException screen cap | ||
Created attachment 18 [details] java.lang.StringIndexOutOfBoundsException screen cap Java version: 11 OS version: Windows10 1803, OS build: 17134.345 Every time I try to input a card choice with 3 number, like 410, 110, 210, system throw java.lang.StringIndexOutOfBoundsException. Full message: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: begin 2, end 4, length 3 at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319) at java.base/java.lang.String.substring(String.java:1874) at cards.PlayPoker.errorHandler(PlayPoker.java:126) at cards.PlayPoker.startPlay(PlayPoker.java:75) at cards.PlayPoker.main(PlayPoker.java:36) This exception only throw when my input contained 3 number.