Return the full string when requested from a flatbuffers::String, even if it contains a NULL byte.
This commit is contained in:
parent
d7b4a31e93
commit
671c9495d9
|
@ -379,7 +379,7 @@ template<typename T> static inline size_t VectorLength(const Vector<T> *v) {
|
|||
|
||||
struct String : public Vector<char> {
|
||||
const char *c_str() const { return reinterpret_cast<const char *>(Data()); }
|
||||
std::string str() const { return c_str(); }
|
||||
std::string str() const { return std::string(c_str(), Length()); }
|
||||
|
||||
bool operator <(const String &o) const {
|
||||
return strcmp(c_str(), o.c_str()) < 0;
|
||||
|
|
Loading…
Reference in New Issue