Skip to content

Commit

Permalink
Bugfix in autoSave function
Browse files Browse the repository at this point in the history
  • Loading branch information
olepoeschl committed Jan 14, 2022
1 parent 164211a commit e146952
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/de/nqueensfaf/Solver.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ private void startAutoSaverThread() {
if(!filename.endsWith(".faf")) {
filename += ".faf";
}
float tmpProgress = 0;
float progress = 0;
float progress = getProgress() * 100;
int tmpProgress = (int) progress / autoSavePercentageStep * autoSavePercentageStep;
while(isRunning()) {
progress = getProgress() * 100;
if(progress >= 100)
Expand All @@ -297,7 +297,7 @@ else if(progress >= tmpProgress + autoSavePercentageStep) {
} catch (IOException e) {
e.printStackTrace();
}
tmpProgress = progress;
tmpProgress = (int) progress;
}
try {
Thread.sleep(progressUpdateDelay);
Expand Down

0 comments on commit e146952

Please sign in to comment.