+ /*
+ * ... and thirdly:
+ *
+ * - there are no *stray* borders, in that every border is
+ * actually part of the division between two components.
+ * Otherwise you could cheat by finding a subdivision which did
+ * not *exceed* any clue square's counter, and then adding a
+ * few extra edges.
+ */
+ for (y = 0; y < h; y++) {
+ for (x = 0; x < w; x++) {
+ if (x+1 < w && (border[y*w+x] & BORDER_R) &&
+ dsf_canonify(dsf, y*w+x) == dsf_canonify(dsf, y*w+(x+1)))
+ goto error;
+ if (y+1 < h && (border[y*w+x] & BORDER_D) &&
+ dsf_canonify(dsf, y*w+x) == dsf_canonify(dsf, (y+1)*w+x))
+ goto error;
+ }
+ }
+