shithub: puzzles

Download patch

ref: 5619904bcc12427e88a05281872231f69f06180d
parent: 89bfecaa5aa39469a3e368d44f517aff5c904354
author: Simon Tatham <anakin@pobox.com>
date: Thu May 5 13:13:16 EDT 2011

Apply a missing bit of r9164, which only broke the build with
-DDEBUGGING so I didn't notice it at the time.

[originally from svn r9167]
[r9164 == 2efc77d2fde7e53604f8490b57f18a36eec5c4fb]

--- a/magnets.c
+++ b/magnets.c
@@ -1544,7 +1544,8 @@
                 ret = solve_set(state, i, NEUTRAL, "layout", NULL);
         }
         if (!ret) {
-            debug(("Unable to lay anything at (%d,%d), giving up.", x, y));
+            debug(("Unable to lay anything at (%d,%d), giving up.",
+                   i%state->w, i/state->w));
             ret = -1;
             break;
         }