1
0
Fork 0

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
This commit is contained in:
Sjoerd van der Berg 2004-05-25 19:37:18 +00:00
parent 9bd827965c
commit a856ff1a06

View file

@ -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;
}
}