From: H.G.Muller Date: Mon, 9 Jun 2014 06:59:01 +0000 (+0200) Subject: Fix null-termination of internal FEN X-Git-Url: http://winboard.nl/cgi-bin?p=hachu.git;a=commitdiff_plain;h=0a0b4f05a0fad2c387e2970df1073dd20dbdeebb Fix null-termination of internal FEN When setting up a position, pieces of an earlier setup position with longer FEN could be appended to it, and would be placed off-board on the last rank. --- diff --git a/hachu.c b/hachu.c index 503d061..11e1222 100644 --- a/hachu.c +++ b/hachu.c @@ -2336,6 +2336,7 @@ Convert (char *fen) if(!*fen) break; fen++; } + *p = '\0'; printf("# converted FEN '%s'\n", fenArray); return fenArray; }