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:
parent
8eac301566
commit
29dc5ac034
1 changed files with 4 additions and 2 deletions
|
|
@ -430,7 +430,8 @@ public:
|
||||||
const char *c = paramValue.c_str();
|
const char *c = paramValue.c_str();
|
||||||
string tmpStr = c+1;// skip the "
|
string tmpStr = c+1;// skip the "
|
||||||
if (tmpStr[tmpStr.length()-1] == '\"') { // one word only
|
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;
|
return tmpStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -439,7 +440,8 @@ public:
|
||||||
_is >> paramValue;
|
_is >> paramValue;
|
||||||
// test last character of paramValue for "
|
// test last character of paramValue for "
|
||||||
if (paramValue[paramValue.length()-1] == '\"') {
|
if (paramValue[paramValue.length()-1] == '\"') {
|
||||||
paramValue[paramValue.length()-1] = '\0';
|
paramValue.erase( ¶mValue[paramValue.length()-1] );
|
||||||
|
//paramValue[paramValue.length()-1] = '\0';
|
||||||
stop = true;
|
stop = true;
|
||||||
}
|
}
|
||||||
tmpStr = tmpStr + " " + paramValue ;
|
tmpStr = tmpStr + " " + paramValue ;
|
||||||
|
|
|
||||||
Reference in a new issue