Declare valueString before passing to ParseScalar
This is to account for the length of the scalar string value, which is passed as an element of event.data.scalar.
This commit is contained in:
parent
693e4fa80d
commit
98fe95e1a5
1 changed files with 3 additions and 1 deletions
|
@ -61,7 +61,9 @@ struct VectorParser
|
|||
}
|
||||
|
||||
Type value;
|
||||
if (!ParseScalar<Type>((const char *)event.data.scalar.value, value)) {
|
||||
std::string valueString((char*)event.data.scalar.value,
|
||||
event.data.scalar.length);
|
||||
if (!ParseScalar<Type>(valueString, value)) {
|
||||
assert(false);
|
||||
}
|
||||
mVector.push_back(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue