Strip leading = from value. Can happen if you execute "irq =5".
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4209
This commit is contained in:
parent
5c8e9264d1
commit
6b0f8d6833
1 changed files with 7 additions and 2 deletions
|
@ -719,9 +719,14 @@ void CONFIG::Run(void) {
|
|||
// Input has been parsed (pvar[0]=section, [1]=property, [2]=value)
|
||||
// now execute
|
||||
Section* tsec = control->GetSection(pvars[0]);
|
||||
std::string value;
|
||||
value += pvars[2];
|
||||
std::string value(pvars[2]);
|
||||
//Due to parsing there can be a = at the start of value.
|
||||
while (value.size() && (value.at(0) ==' ' ||value.at(0) =='=') ) value.erase(0,1);
|
||||
for(Bitu i = 3; i < pvars.size(); i++) value += (std::string(" ") + pvars[i]);
|
||||
if (value.empty() ) {
|
||||
WriteOut(MSG_Get("PROGRAM_CONFIG_SET_SYNTAX"));
|
||||
return;
|
||||
}
|
||||
std::string inputline = pvars[1] + "=" + value;
|
||||
|
||||
tsec->ExecuteDestroy(false);
|
||||
|
|
Loading…
Add table
Reference in a new issue