The comment popup is also used to display engine PV info, but when the
contents of the window is written back when we select a variation,
it was treated as a real comment. This is fixed now by checing in
ReplaceComment() if the comment starts with the PV info, and if so,
ignore the latter. This solves the problem, but I guess the real bug is
that selecting a variation tries to write the comment even if it did not
change.
char *text;
{
int len;
+ char *p;
+ float score;
+ if(index && sscanf(text, "%f/%d", &score, &len) == 2 &&
+ pvInfoList[index-1].depth == len &&
+ pvInfoList[index-1].score == (int) (score*100 + 0.5) &&
+ (p = strchr(text, '\n'))) text = p; // [HGM] strip off first line with PV info, if any
while (*text == '\n') text++;
len = strlen(text);
while (len > 0 && text[len - 1] == '\n') len--;