diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/uci.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/uci.cpp b/src/uci.cpp index 4357e99..f099b78 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -11,6 +11,7 @@ #include <cctype> #include <cstdint> #include <cstdio> +#include <cstdlib> #include <iostream> #include <sstream> #include <string> @@ -129,7 +130,10 @@ void Uci() { break; } } - + if (depth != -1 && depth <= 0) { + cout << "Fatal: Depth must be positive integer"; + exit(1); + } Move best = GetBestMove(&game, depth); cout << "bestmove "; |
