aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac/string_utilities.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/mac/string_utilities.cc')
-rw-r--r--src/common/mac/string_utilities.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/mac/string_utilities.cc b/src/common/mac/string_utilities.cc
index 57cc19ad..bdf3336c 100644
--- a/src/common/mac/string_utilities.cc
+++ b/src/common/mac/string_utilities.cc
@@ -67,7 +67,11 @@ unsigned int IntegerValueAtIndex(string &str, unsigned int idx) {
end = str.size();
temp = str.substr(start, end - start);
- result = atoi(temp.c_str());
+
+ if (found == idx) {
+ result = atoi(temp.c_str());
+ }
+
start = str.find_first_of(digits, end + 1);
if (start == string::npos)