version 1.4.44b
[polyglot.git] / uci.c
diff --git a/uci.c b/uci.c
index e44fa34..574c288 100644 (file)
--- a/uci.c
+++ b/uci.c
@@ -22,7 +22,7 @@
 \r
 static const bool UseDebug = FALSE;\r
 \r
-static const int StringSize = 4096;\r
+#define StringSize ((int)4096)\r
 \r
 // variables\r
 \r
@@ -61,8 +61,8 @@ static int  mate_score     (int dist);
 // uci_set_threads()\r
 \r
 void uci_set_threads(uci_t * uci, int n) {\r
-    ASSERT(n>=1);\r
     const char *thread_option=uci_thread_option(uci);\r
+    ASSERT(n>=1);\r
     if(thread_option){\r
         uci_send_option(uci,thread_option,"%d",n);\r
     }\r
@@ -271,7 +271,7 @@ bool uci_send_option(uci_t * uci, const char option[], const char format[], ...)
    opt=option_find(uci->option,option);\r
    if(opt){\r
        found=TRUE;\r
-       if(!my_string_case_equal(opt->type,"button")){\r
+       if(!IS_BUTTON(opt)){\r
            if(!my_string_equal(opt->value,value)){\r
                engine_send(uci->engine,"setoption name %s value %s",\r
                            opt->name,value);\r