Jelajahi Sumber

BUG: make sure flag is found even with extra spaces at the start

Bill Hoffman 17 tahun lalu
induk
melakukan
7ac6912d5e
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      Source/cmGlobalXCodeGenerator.cxx

+ 1 - 1
Source/cmGlobalXCodeGenerator.cxx

@@ -1017,7 +1017,7 @@ std::string cmGlobalXCodeGenerator::ExtractFlag(const char* flag,
 {
   std::string retFlag;
   std::string::size_type pos = flags.find(flag);
-  if(pos != flags.npos && (pos ==0 || flags[pos]==' '))
+  if(pos != flags.npos && (pos ==0 || flags[pos-1]==' '))
     {
     while(pos < flags.size() && flags[pos] != ' ')
       {