TheRandomLabs / ChangelogGenerator

Generates changelogs for CurseForge modpacks.
MIT License
35 stars 5 forks source link

String Index Out of Bounds issue #13

Closed FallenEagle1 closed 5 years ago

FallenEagle1 commented 5 years ago

This is with using 1.11.1 Came across this error when making a changelog between these two: new.txt old.txt

Stack Trace

```java java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at com.therandomlabs.changeloggenerator.IC2Handler.getChangelog(IC2Handler.java:36) at com.therandomlabs.curseapi.minecraft.comparison.VersionChange.getChangelogs(VersionChange.java:228) at com.therandomlabs.curseapi.minecraft.comparison.VersionChange.getChangelogsQuietly(VersionChange.java:186) at com.therandomlabs.curseapi.minecraft.comparison.VersionChange.getChangelogs(VersionChange.java:354) at com.therandomlabs.curseapi.minecraft.comparison.ModListComparison.getUpdatedChangelogs(ModListComparison.java:114) at com.therandomlabs.changeloggenerator.ChangelogGenerator.getChangelog(ChangelogGenerator.java:220) at com.therandomlabs.changeloggenerator.ChangelogGenerator.run(ChangelogGenerator.java:114) at com.therandomlabs.changeloggenerator.ChangelogGenerator.main(ChangelogGenerator.java:60) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(Unknown Source) at com.therandomlabs.changeloggenerator.IC2Handler.getChangelog(IC2Handler.java:36) at com.therandomlabs.curseapi.minecraft.comparison.VersionChange.getChangelogs(VersionChange.java:228) at com.therandomlabs.curseapi.minecraft.comparison.VersionChange.getChangelogsQuietly(VersionChange.java:186) at com.therandomlabs.curseapi.minecraft.comparison.VersionChange.getChangelogs(VersionChange.java:354) at com.therandomlabs.curseapi.minecraft.comparison.ModListComparison.getUpdatedChangelogs(ModListComparison.java:114) at com.therandomlabs.changeloggenerator.ChangelogGenerator.getChangelog(ChangelogGenerator.java:220) at com.therandomlabs.changeloggenerator.ChangelogGenerator.run(ChangelogGenerator.java:118) at com.therandomlabs.changeloggenerator.ChangelogGenerator.main(ChangelogGenerator.java:60) ```

TheRandomLabs commented 5 years ago

This is fixed in 1.11.2. I also ran the generator for you:

changelog.txt shortchangelog.txt

When the error occurred, did ChangelogGenerator keep running or did it crash?

FallenEagle1 commented 5 years ago

I haven't done a complete comparison, but it looks like it continued running, the line count is either similar or the same. But good to hear, will update the version I have