From 139800bf5d030769911099a705c53c1aa44ac6d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Thu, 21 Feb 2013 19:42:12 +0100 Subject: [PATCH] Fix wrong usage of std::string::find --- src/version.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/version.cc b/src/version.cc index 7e805c1..b3a93d1 100644 --- a/src/version.cc +++ b/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) { + -- 2.7.4