Skip to content

Commit

Permalink
add check to prevent out of bound exception in LogAnalyser. fixes #81
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouckaert committed Feb 4, 2024
1 parent 6f7d5b5 commit f898660
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/beastfx/app/tools/LogAnalyser.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ protected void readLogFile(String fileName, int burnInPercentage) throws IOExcep
int i = 0;
if (str.indexOf('#') < 0 && str.matches("[-0-9].*")) // {
//data++;
if (++data >= 0) //{
if (++data >= 0 && data < m_fTraces[0].length) //{
for (String str2 : str.split("\\s")) {
try {
if (str2.indexOf('.') >= 0) {
Expand Down Expand Up @@ -673,8 +673,8 @@ static void printUsageAndExit() {
}

class CoreRunnable implements java.lang.Runnable {
private static boolean headerPrinted = false;
private static int lineNr = 0;
private boolean headerPrinted = false;
private int lineNr = 0;
int start, end;
CountDownLatch countDown;
List<String> files;
Expand Down

0 comments on commit f898660

Please sign in to comment.