From a856ff1a06f4ed32009ae82f12a1a73034469410 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Tue, 25 May 2004 19:37:18 +0000 Subject: [PATCH] Fix some string parsing function to allow to remove the found string Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1807 --- src/misc/setup.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/misc/setup.cpp b/src/misc/setup.cpp index d10582fb..a0e78b53 100644 --- a/src/misc/setup.cpp +++ b/src/misc/setup.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: setup.cpp,v 1.19 2004-01-29 09:26:52 qbix79 Exp $ */ +/* $Id: setup.cpp,v 1.20 2004-05-25 19:37:18 harekiet Exp $ */ #include "dosbox.h" #include "cross.h" @@ -385,6 +385,7 @@ bool CommandLine::FindStringBegin(char * begin,std::string & value, bool remove) for (it=cmds.begin();it!=cmds.end();it++) { if (strncmp(begin,(*it).c_str(),strlen(begin))==0) { value=((*it).c_str()+strlen(begin)); + if (remove) cmds.erase(it); return true; } }