Fix prevent warning
authorHyunwoo Kim <hwlove.kim@samsung.com>
Mon, 17 Jun 2013 05:59:15 +0000 (14:59 +0900)
committerHyunwoo Kim <hwlove.kim@samsung.com>
Mon, 17 Jun 2013 06:17:36 +0000 (15:17 +0900)
Change-Id: I75e8982fd09499d305f1d8a36491ffb2928cffac
Signed-off-by: Hyunwoo Kim <hwlove.kim@samsung.com>
ace/engine/Attribute.cpp

index 56cfc44..2471999 100644 (file)
@@ -289,10 +289,12 @@ Attribute::parse(const std::string *input,
     static const char *pattern =
         "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?";
     pcrecpp::RE re(pattern);
-    re.FullMatch(input->c_str(), &val[0], &val[1],
+    if (!re.FullMatch(input->c_str(), &val[0], &val[1],
                  &val[2], &val[3], &val[4],
-                 &val[5], &val[6], &val[7], &val[8]);
-
+                 &val[5], &val[6], &val[7], &val[8])) {
+        LogDebug("Error: attribute parsing failed.");
+        return false;
+    }
 #ifdef ALL_LOGS
     for (int i = 0; i < 9; i++) {
         LogDebug("val " << i << " :" << val[i]);