From 832f69f4f04040872c0400167a4875dc8b7781bc Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sat, 19 Oct 2002 17:33:08 +0000 Subject: [PATCH] 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 --- src/misc/setup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/misc/setup.cpp b/src/misc/setup.cpp index eadee807..9d0b8b98 100644 --- a/src/misc/setup.cpp +++ b/src/misc/setup.cpp @@ -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; }