From cc9fad0820d620c8a8fb609a257b82bc36b37c5d Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 2 Aug 2026 13:32:03 +0200 Subject: error hangling --- src/uci.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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 #include #include +#include #include #include #include @@ -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 "; -- cgit v1.2.3