Browse Source

修改bug

linxianzhi 2 years ago
parent
commit
57381114f5
1 changed files with 2 additions and 0 deletions
  1. 2 0
      MFCApplication1/AssignWords.cpp

+ 2 - 0
MFCApplication1/AssignWords.cpp

@@ -247,6 +247,8 @@ int AssignWordsFromTest(std::string pathName, std::vector<std::string> &twoList,
 			{
 				ReplaceFlagWord(WordList, strTemp);
 			}
+			if (strTemp == "")
+				continue;
 			
 			cv::Size WordsWith = GetTextSize(strTemp.c_str(), font_size, font_family);
 			if (WordsWith.width < maxFourWith)