ref: e66d027a81211d327319cf45bb4155e689513f72
parent: 171e7a76ed271b90ab8717939c02c1bce9b1fced
author: Ben Harris <bjh21@bjh21.me.uk>
date: Mon Jan 9 15:38:38 EST 2023
Fix Pattern row clues when a row has no black in I'd failed to initialise the row clue string to empty so it got the contents of the previous row to be displayed. This could only happen for imported descriptions, or for puzzles with one or two columns. Thanks to Glen Sawyer for spotting and reporting the bug.
--- a/pattern.c
+++ b/pattern.c
@@ -1841,6 +1841,7 @@
size_t off = 0;
assert(rowlen <= state->common->rowsize);
+ *ds->strbuf = '\0';
for (j = 0; j < rowlen; j++)
off += sprintf(ds->strbuf + off, "%s%d", j ? " " : "", rowdata[j]);
y = ry;