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:
parent
1b242dcbda
commit
832f69f4f0
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue