From 2e9c223209f31b22045ecd673ac246ece089753a Mon Sep 17 00:00:00 2001 From: Tomasz Marciniak Date: Wed, 10 May 2017 11:45:37 +0200 Subject: [PATCH] [MessagePort] Fix for temporary object returned. [Bug] rvalue objects were returned instead of reference to picojson string. [Verification] Code compiles. TCT pass rate 100% (51/51/0/0/0) Change-Id: I30b6c3f3d2ec4730f2e810a66d1b6ebb17f5a418 Signed-off-by: Tomasz Marciniak --- src/messageport/messageport_instance.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/messageport/messageport_instance.cc b/src/messageport/messageport_instance.cc index 60b99113..36aa6785 100755 --- a/src/messageport/messageport_instance.cc +++ b/src/messageport/messageport_instance.cc @@ -410,7 +410,7 @@ void MessageportInstance::RemoteMessagePortSendmessage size_t i = 0; for (auto iter = value_array.begin(); iter != value_array.end(); ++iter, ++i) { - arr[i] = iter->to_str().c_str(); + arr[i] = iter->get().c_str(); } bundle_add_str_array(bundle, (*it).get("key").to_str().c_str(), arr, size); -- 2.34.1