From 5080e72ea55836f6e0311f9371f9c049e77f3c6b Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Thu, 18 Sep 2008 09:49:54 +0100 Subject: [PATCH] Prefer strncpy() to strcpy() This removes a warning under MSVC++ Signed-off-by: Marco Costalba --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 71da3ec..e4675df 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -2135,7 +2135,7 @@ namespace { if(data) { char input[256]; if(fgets(input, 255, stdin) == NULL) - strcpy(input, "quit\n"); + strncpy(input, "quit\n", 5); if(strncmp(input, "quit", 4) == 0) { AbortSearch = true; PonderSearch = false; -- 2.11.4.GIT