mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
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.
This commit is contained in:
@ -1841,6 +1841,7 @@ static void draw_numbers(
|
|||||||
size_t off = 0;
|
size_t off = 0;
|
||||||
|
|
||||||
assert(rowlen <= state->common->rowsize);
|
assert(rowlen <= state->common->rowsize);
|
||||||
|
*ds->strbuf = '\0';
|
||||||
for (j = 0; j < rowlen; j++)
|
for (j = 0; j < rowlen; j++)
|
||||||
off += sprintf(ds->strbuf + off, "%s%d", j ? " " : "", rowdata[j]);
|
off += sprintf(ds->strbuf + off, "%s%d", j ? " " : "", rowdata[j]);
|
||||||
y = ry;
|
y = ry;
|
||||||
|
Reference in New Issue
Block a user