projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
295352d
)
Prefer strncpy() to strcpy()
author
Marco Costalba
<mcostalba@gmail.com>
Thu, 18 Sep 2008 08:49:54 +0000 (09:49 +0100)
committer
Marco Costalba
<mcostalba@gmail.com>
Thu, 18 Sep 2008 10:25:55 +0000 (12:25 +0200)
This removes a warning under MSVC++
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp
patch
|
blob
|
history
diff --git
a/src/search.cpp
b/src/search.cpp
index
71da3ec
..
e4675df
100644
(file)
--- 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;