From: Pawel Kaczmarek Date: Tue, 2 Jun 2015 09:19:46 +0000 (+0200) Subject: Fix GetRuntimeVariable X-Git-Tag: submit/tizen_tv/20150603.064601^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7821a7ae95f9244e7ea41e78271d0a778ca45391;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git Fix GetRuntimeVariable Change-Id: Ifd5131facc2c1b040f938555c29758113cbeed34 Signed-off-by: Pawel Kaczmarek --- diff --git a/src/common/extension.cc b/src/common/extension.cc index f054e5fe..33ca4565 100755 --- a/src/common/extension.cc +++ b/src/common/extension.cc @@ -161,8 +161,8 @@ std::string Extension::GetRuntimeVariable(const char* var_name, unsigned len) { // but that's wrt and wrt-service's bug. // To keep compatibilities, two case of formats should be considered in webapi-plugins. // removing double quote to keep compatibilities with new and old wrt - std::string value = std::string(res.begin(), res.end()); - if (var_name == "app_id" && value.find('"', 0) != std::string::npos + std::string value = std::string(res.data()); + if (0 == strncmp(var_name, "app_id", 6) && value.find('"', 0) != std::string::npos && value.find('"', value.size() -1) != std::string::npos) { value = value.erase(0, 1);