X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=book.c;h=48fbc9dd2bee1d6ae1ec546b3aa74de2a015632a;hb=0ea1b434ac6becf79c75d85ba27de5b89666a7c3;hp=2c1a06a50f828ad02b5d9be83244bf00253af103;hpb=01768d1677ff891d503bbfa250b09d373bfa7422;p=xboard.git diff --git a/book.c b/book.c index 2c1a06a..48fbc9d 100644 --- a/book.c +++ b/book.c @@ -445,13 +445,13 @@ void move_to_string(char move_s[6], uint16 move) // correct FRC-style castlings in variant normal. // [HGM] This is buggy code! e1h1 could very well be a normal R or Q move. if(!strcmp(move_s,"e1h1")){ - strcpy(move_s,"e1g1"); + safeStrCpy(move_s,"e1g1", sizeof(move_s)/sizeof(move_s[0])); }else if(!strcmp(move_s,"e1a1")){ - strcpy(move_s,"e1c1"); + safeStrCpy(move_s,"e1c1", sizeof(move_s)/sizeof(move_s[0])); }else if(!strcmp(move_s,"e8h8")){ - strcpy(move_s,"e8g8"); + safeStrCpy(move_s,"e8g8", sizeof(move_s)/sizeof(move_s[0])); }else if(!strcmp(move_s,"e8a8")){ - strcpy(move_s,"e8c8"); + safeStrCpy(move_s,"e8c8", sizeof(move_s)/sizeof(move_s[0])); } }