X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=29b473b22e006cc0d5ab515884cf7ae1943de63d;hb=d45b23cf75433a48797cfc5e81ce8fdcfea7c94b;hp=7cc8f9cc9c214fc80a781d97ea02c728f6b55d68;hpb=494c14427dd2854d928019558e1cf8f87ba30ca7;p=xboard.git diff --git a/backend.c b/backend.c index 7cc8f9c..29b473b 100644 --- a/backend.c +++ b/backend.c @@ -17362,6 +17362,8 @@ ParseOption (Option *opt, ChessProgramState *cps) opt->type = SaveButton; } else return FALSE; *p = 0; // terminate option name + *(int*) (opt->name + MSG_SIZ - 104) = opt->value; // hide default values somewhere + if(opt->target == &opt->textValue) strncpy(opt->name + MSG_SIZ - 100, opt->textValue, 99); // now look if the command-line options define a setting for this engine option. if(cps->optionSettings && cps->optionSettings[0]) p = strstr(cps->optionSettings, opt->name); else p = NULL; @@ -17374,6 +17376,8 @@ ParseOption (Option *opt, ChessProgramState *cps) if(!strcmp(((char**)opt->textValue)[n], q+1)) opt->value = n; break; case TextBox: + case FileName: + case PathName: safeStrCpy(opt->textValue, q+1, MSG_SIZ - (opt->textValue - opt->name)); break; case Spin: @@ -17385,8 +17389,6 @@ ParseOption (Option *opt, ChessProgramState *cps) strcat(buf, "\n"); SendToProgram(buf, cps); } - *(int*) (opt->name + MSG_SIZ - 104) = opt->value; // hide default values somewhere - if(opt->target == &opt->textValue) strncpy(opt->name + MSG_SIZ - 100, opt->textValue, 99); return TRUE; }