From e66d027a81211d327319cf45bb4155e689513f72 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 9 Jan 2023 20:38:38 +0000 Subject: [PATCH] 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. --- pattern.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pattern.c b/pattern.c index 92d8a79..489eb54 100644 --- a/pattern.c +++ b/pattern.c @@ -1841,6 +1841,7 @@ static void draw_numbers( 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;