Skip to content
Browse files

Merge pull request #506 from syntheticpp/string-find

Fix wrong usage of std::string::find
  • Loading branch information...
2 parents e758e8d + 139800b commit b26d21753cb56436782f421de80cbcd57bd03316 @martine martine committed Feb 21, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/version.cc
View
3 src/version.cc
@@ -26,7 +26,7 @@ void ParseVersion(const string& version, int* major, int* minor) {
*minor = 0;
if (end != string::npos) {
size_t start = end + 1;
- end = version.find(start, '.');
+ end = version.find('.', start);
*minor = atoi(version.substr(start, end).c_str());
}
}
@@ -54,3 +54,4 @@ void CheckNinjaVersion(const string& version) {
+

0 comments on commit b26d217

Please sign in to comment.
Something went wrong with that request. Please try again.