mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Prefer strncpy() to strcpy()
This removes a warning under MSVC++ Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -2135,7 +2135,7 @@ namespace {
|
|||||||
if(data) {
|
if(data) {
|
||||||
char input[256];
|
char input[256];
|
||||||
if(fgets(input, 255, stdin) == NULL)
|
if(fgets(input, 255, stdin) == NULL)
|
||||||
strcpy(input, "quit\n");
|
strncpy(input, "quit\n", 5);
|
||||||
if(strncmp(input, "quit", 4) == 0) {
|
if(strncmp(input, "quit", 4) == 0) {
|
||||||
AbortSearch = true;
|
AbortSearch = true;
|
||||||
PonderSearch = false;
|
PonderSearch = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user