1
0
Fork 0

Command line wouldn't erase the 2 command line switches, fixed now.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@368
This commit is contained in:
Sjoerd van der Berg 2002-10-19 17:33:08 +00:00
parent 1b242dcbda
commit 832f69f4f0

View file

@ -269,7 +269,7 @@ bool CommandLine::FindHex(char * name,int & value,bool remove) {
if (!(FindEntry(name,it,true))) return false;
it_next=it;it_next++;
sscanf((*it_next).c_str(),"%X",&value);
if (remove) cmds.erase(it,it_next);
if (remove) cmds.erase(it,++it_next);
return true;
}
@ -278,7 +278,7 @@ bool CommandLine::FindInt(char * name,int & value,bool remove) {
if (!(FindEntry(name,it,true))) return false;
it_next=it;it_next++;
value=atoi((*it_next).c_str());
if (remove) cmds.erase(it,it_next);
if (remove) cmds.erase(it,++it_next);
return true;
}
@ -287,7 +287,7 @@ bool CommandLine::FindString(char * name,std::string & value,bool remove) {
if (!(FindEntry(name,it,true))) return false;
it_next=it;it_next++;
value=*it_next;
if (remove) cmds.erase(it,it_next);
if (remove) cmds.erase(it,++it_next);
return true;
}