fix crash in getNextPound

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1814 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
jfouet 2008-06-04 08:32:19 +00:00
parent bf34eb891d
commit 8e54557e9f

View File

@ -29,7 +29,7 @@ int getNextPound(std::string &theString, std::string &substring, const std::stri
{
if ((pos = theString.find(delimiter)) != std::string::npos){
substring.assign(theString, 0, pos);
theString.assign(theString, pos + delimiter.size(), theString.size());
theString.erase(0,pos + delimiter.size());
}
else{
substring.assign(theString);