Fix GetRuntimeVariable
authorPawel Kaczmarek <p.kaczmarek3@samsung.com>
Tue, 2 Jun 2015 09:19:46 +0000 (11:19 +0200)
committerPawel Kaczmarek <p.kaczmarek3@samsung.com>
Tue, 2 Jun 2015 09:19:46 +0000 (11:19 +0200)
Change-Id: Ifd5131facc2c1b040f938555c29758113cbeed34
Signed-off-by: Pawel Kaczmarek <p.kaczmarek3@samsung.com>
src/common/extension.cc

index f054e5fe46b86d68d6f9a0373c835f76fe197f4c..33ca4565eebaaa7b25c449bce889d8edfd9bddf6 100755 (executable)
@@ -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);