[fix] Fix the parsing failure during splitting multiple files to the argument

The second parameter of std::string::substr holds the number of
characters to include in the substring, rather than the index of
the end of the capture.

Change-Id: Ie8c36efcb1850fcc1f44d430569f18646f6bfd45
Signed-off-by: TatWai Chong <tatwai.chong@arm.com>
diff --git a/reference_model/src/main.cpp b/reference_model/src/main.cpp
index 6d50f9e..6970bb1 100644
--- a/reference_model/src/main.cpp
+++ b/reference_model/src/main.cpp
@@ -557,7 +557,9 @@
         if (end == std::string::npos)
             last_pair = true;
 
-        name = raw_str.substr(start, end);
+        // The second parameter holds for number of characters to include in the substring,
+        // not for the index of the end of the capture.
+        name = raw_str.substr(start, end - start);
 
         result.push_back(name);