X-Git-Url: http://winboard.nl/cgi-bin?p=polyglot.git;a=blobdiff_plain;f=uci.cpp;h=d7f63b4859abe608c5ce272dfa3c1ade9b8349a6;hp=a84628ed7122a14d249c08f12cbe83e91e0c051b;hb=6442b61046f46f65bfc4bf0b3727abe2dc27acb8;hpb=e7a2abd9bd4fce9ebbd70793b00d9d5f99886348 diff --git a/uci.cpp b/uci.cpp index a84628e..d7f63b4 100644 --- a/uci.cpp +++ b/uci.cpp @@ -139,7 +139,7 @@ void uci_open(uci_t * uci, engine_t * engine) { do { engine_get(uci->engine,string,StringSize); event = uci_parse(uci,string); - } while ((event & EVENT_UCI) == 0); + } while (!engine_eof(Engine) && (event & EVENT_UCI) == 0); } // uci_close() @@ -223,7 +223,7 @@ void uci_send_isready_sync(uci_t * uci) { do { engine_get(uci->engine,string,StringSize); event = uci_parse(uci,string); - } while ((event & EVENT_READY) == 0); + } while (!engine_eof(Engine) && (event & EVENT_READY) == 0); } // uci_send_stop() @@ -258,7 +258,7 @@ void uci_send_stop_sync(uci_t * uci) { do { engine_get(uci->engine,string,StringSize); event = uci_parse(uci,string); - } while ((event & EVENT_STOP) == 0); + } while (!engine_eof(Engine) && (event & EVENT_STOP) == 0); } // uci_send_ucinewgame()