X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=book.c;h=5c5eea6353e7a6059f3303be33387a6f68ad2e51;hb=e433631c9b9449829b54526e0d0ebaeec71b270a;hp=3a764b9dde63ff61f8b4ebddc7f24b3a244413c1;hpb=5f68e032eeca21f92f8a45648976770ea25ac559;p=xboard.git diff --git a/book.c b/book.c index 3a764b9..5c5eea6 100644 --- a/book.c +++ b/book.c @@ -585,7 +585,7 @@ int TextToMoves(char *text, int moveNum, entry_t *entries) valid = ParseOneMove(text, moveNum, &moveType, &fromX, &fromY, &toX, &toY, &promoChar); text = strstr(text, yy_textstr) + strlen(yy_textstr); // skip what we parsed if(!valid || moveType != NormalMove) continue; - if(*text == ' ' && sscanf(text+1, "{%d/%d}", &entries[count].learnPoints, &entries[count].learnCount) == 2) { + if(*text == ' ' && sscanf(text+1, "{%hd/%hd}", &entries[count].learnPoints, &entries[count].learnCount) == 2) { text = strchr(text+1, '}') + 1; } else { entries[count].learnPoints = 0;