浏览代码

BUG:6990 fix crash with set_source_files_properties

Bill Hoffman 17 年之前
父节点
当前提交
b7ed54c950
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Source/cmSetSourceFilesPropertiesCommand.cxx

+ 2 - 1
Source/cmSetSourceFilesPropertiesCommand.cxx

@@ -33,7 +33,8 @@ bool cmSetSourceFilesPropertiesCommand
   std::vector<std::string>::const_iterator j;
   std::vector<std::string>::const_iterator j;
   j = args.begin();
   j = args.begin();
   // old style allows for specifier before PROPERTIES keyword
   // old style allows for specifier before PROPERTIES keyword
-  while (*j != "ABSTRACT" &&
+  while (j != args.end() &&
+         *j != "ABSTRACT" &&
          *j != "WRAP_EXCLUDE" &&
          *j != "WRAP_EXCLUDE" &&
          *j != "GENERATED" &&
          *j != "GENERATED" &&
          *j != "COMPILE_FLAGS" &&
          *j != "COMPILE_FLAGS" &&