1
0
Fork 0

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:
Peter Veenstra 2019-04-19 19:28:55 +00:00
parent 5c8e9264d1
commit 6b0f8d6833

View file

@ -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);