uci->best_depth = 0;\r
uci->best_sel_depth = 0;\r
line_clear(uci->best_pv);\r
-\r
- uci->node_nb = 0;\r
+// make the default 1 instead of 0 so that info lines can be recognized by their node number 0\r
+ uci->node_nb = 1;\r
uci->time = 0.0;\r
uci->speed = 0.0;\r
uci->cpu = 0.0;\r
}else if(my_string_case_equal(argument,"Resign")){\r
event |= EVENT_RESIGN;\r
}else{\r
- strcpy(uci->info,argument);\r
+ snprintf(uci->info,sizeof(uci->info),"%s",argument);\r
+ uci->info[sizeof(uci->info)-1]='\0';\r
event|=EVENT_INFO;\r
}\r
// TODO: argument to EOS\r
} else {\r
\r
my_log("POLYGLOT unknown option \"%s\" for command \"%s\"\n",option,command);\r
- // this is for buggy engines; it should probably be protected\r
+ // This should probably be protected\r
// by a "WorkAround" option.\r
- strcpy(uci->info,option);\r
- strcat(uci->info," ");\r
- strcat(uci->info,argument);\r
+ snprintf(uci->info,sizeof(uci->info),"%s %s",option,argument);\r
+ uci->info[sizeof(uci->info)-1]='\0';\r
event|=EVENT_INFO;\r
}\r
}\r