Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
Fix infinite loop when handling a tile in the last column. (Using mod…
Browse files Browse the repository at this point in the history
…ulo on the incrementor seems wrong from the outset, but there may have been some intention behind it...)
  • Loading branch information
Palle Raabjerg committed Feb 10, 2016
1 parent 8be9d02 commit 71d1e7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsearch/src/jsearch/Jsearch.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public static void main(String[] args) throws Exception {
out.println(line);
}
out.close();
for (int i = (x+4095)%4096; i < x+3; i = (i+1)%4096) {
for (int i = (x+4095)%4096; i < x+3; i = i+1) {
for (int j = Math.max(y-1, 0); j < y+3; j = Math.min(j+1, 4095)) {
if (z12s.containsKey(i*4096+j)) {
z12s.remove(i*4096+j);
Expand Down

0 comments on commit 71d1e7e

Please sign in to comment.