A little problem existed when the Parser tried to read a String because a \0 was inserted sometimes (no others) making imposible to add a new string to the one read and then turning the full string into a char* (understable? :-)

This commit is contained in:
victor 2000-01-04 13:04:00 +00:00
commit 29dc5ac034

View file

@ -430,7 +430,8 @@ public:
const char *c = paramValue.c_str();
string tmpStr = c+1;// skip the "
if (tmpStr[tmpStr.length()-1] == '\"') { // one word only
tmpStr[tmpStr.length()-1] = '\0';
//tmpStr[tmpStr.length()-1] = '\0';
tmpStr.erase( &tmpStr[tmpStr.length()-1] );
return tmpStr;
}
@ -439,7 +440,8 @@ public:
_is >> paramValue;
// test last character of paramValue for "
if (paramValue[paramValue.length()-1] == '\"') {
paramValue[paramValue.length()-1] = '\0';
paramValue.erase( &paramValue[paramValue.length()-1] );
//paramValue[paramValue.length()-1] = '\0';
stop = true;
}
tmpStr = tmpStr + " " + paramValue ;