aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/ninja/Ninja.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index c642a4c..fc1142b 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -551,7 +551,7 @@ namespace backend
if(strncmp(&cLibraries[libraryIndexStart], "-l", 2) == 0)
libraryIndexStart += 2;
- else if(strcmp(&cLibraries[libraryIndexStart], "-pthread") == 0)
+ else if(strncmp(&cLibraries[libraryIndexStart], "-pthread", libraryIndexEnd - libraryIndexStart) == 0)
continue;
size_t libraryPathLength = libraryIndexEnd - libraryIndexStart;
@@ -571,13 +571,15 @@ namespace backend
if(strncmp(&cLibraries[libraryIndexStart], "-l", 2) == 0)
libraryIndexStart += 2;
- else if(strcmp(&cLibraries[libraryIndexStart], "-pthread") == 0)
+ else if(strncmp(&cLibraries[libraryIndexStart], "-pthread", libraryIndexEnd - libraryIndexStart) == 0)
continue;
size_t libraryPathLength = libraryIndexEnd - libraryIndexStart;
if(libraryPathLength > 0)
result.push_back(ninja::NinjaArg::createRaw(cLibraries.substr(libraryIndexStart, libraryPathLength)));
}
+ else
+ ++i;
}
return result;