X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=history.c;h=109c9fb2ae67bd50a99bf3dce99d1a25fcd46397;hb=0ea1b434ac6becf79c75d85ba27de5b89666a7c3;hp=4598799f2952ebf84173e1a7c7e02fe3f46040ec;hpb=01768d1677ff891d503bbfa250b09d373bfa7422;p=xboard.git diff --git a/history.c b/history.c index 4598799..109c9fb 100644 --- a/history.c +++ b/history.c @@ -132,7 +132,7 @@ static void AppendMoveToMemo( int index ) } /* Move text */ - strcpy( buf, SavePart( currMovelist[index] ) ); + safeStrCpy( buf, SavePart( currMovelist[index]) , sizeof( buf)/sizeof( buf[0]) ); strcat( buf, " " ); histMoves[index].memoOffset = AppendToHistoryMemo( buf, 0, 0 ); @@ -184,7 +184,7 @@ void MemoContentUpdated() lastLastMove[0] = '\0'; if( lastLast > 0 ) { - strcpy( lastLastMove, SavePart( currMovelist[lastLast-1] ) ); + safeStrCpy( lastLastMove, SavePart( currMovelist[lastLast-1] ) , sizeof( lastLastMove)/sizeof( lastLastMove[0]) ); } /* Deselect any text, move caret to end of memo */