Use the std::string constructor of StringRef, which will use the length of string correctly.

This commit is contained in:
A.J. Beamon 2020-03-12 12:35:08 -07:00
parent 6940d546f5
commit f7198c4ba3
1 changed files with 1 additions and 1 deletions

View File

@ -1156,7 +1156,7 @@ Future<Version> ReadYourWritesTransaction::getReadVersion() {
Optional<Value> getValueFromJSON(StatusObject statusObj) {
try {
Value output = StringRef(json_spirit::write_string(json_spirit::mValue(statusObj), json_spirit::Output_options::none).c_str());
Value output = StringRef(json_spirit::write_string(json_spirit::mValue(statusObj), json_spirit::Output_options::none));
return output;
}
catch (std::exception& e){