diff --git a/src/misc/programs.cpp b/src/misc/programs.cpp index 12ffcb86..df65122c 100644 --- a/src/misc/programs.cpp +++ b/src/misc/programs.cpp @@ -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);