From 0a0b4f05a0fad2c387e2970df1073dd20dbdeebb Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Mon, 9 Jun 2014 08:59:01 +0200 Subject: [PATCH] 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. --- hachu.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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; } -- 1.7.0.4