projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
3b1f552
)
Clear token before reading from input
author
Rodrigo Exterckötter Tjäder
<rodrigo@tjader.com.br>
Sun, 16 Nov 2014 23:48:30 +0000 (07:48 +0800)
committer
Gary Linscott
<glinscott@gmail.com>
Sun, 16 Nov 2014 23:48:30 +0000 (07:48 +0800)
Previously token would keep its value from the previous line when an empty
line was input, leading to unexpected behaviour.
No functional change
Resolves #119
src/uci.cpp
patch
|
blob
|
history
diff --git
a/src/uci.cpp
b/src/uci.cpp
index
ee1b070
..
0f67c44
100644
(file)
--- a/
src/uci.cpp
+++ b/
src/uci.cpp
@@
-157,6
+157,7
@@
void UCI::loop(int argc, char* argv[]) {
istringstream is(cmd);
+ token.clear(); // getline() could return empty or blank line
is >> skipws >> token;
if (token == "quit" || token == "stop" || token == "ponderhit")