Index: src/rc2lng/rc.cpp =================================================================== diff -u -N -r1a1cfbeb68f7d321843a27a0e81a81952274829c -rcb4e9d4b60d62b25ae2cf556c0642601af56c787 --- src/rc2lng/rc.cpp (.../rc.cpp) (revision 1a1cfbeb68f7d321843a27a0e81a81952274829c) +++ src/rc2lng/rc.cpp (.../rc.cpp) (revision cb4e9d4b60d62b25ae2cf556c0642601af56c787) @@ -213,7 +213,7 @@ if(!pFile) THROW(icpf::exception::format(_T("Error: Cannot open file: ") TSTRFMT _T(" for writing."), pszFile), 0, errno, 0); - for (std::vector::const_iterator it=rLines.begin();it != rLines.end();it++) + for (std::vector::const_iterator it=rLines.begin();it != rLines.end();++it) { CString str = (*it); str += _T("\r\n"); @@ -517,14 +517,13 @@ bool CRCFile::ProcessRCFile() { - int iPos; CString strData; - std::vector vStrTable; - for (std::vector::iterator it=m_vInRCFile.begin();it != m_vInRCFile.end();it++) + for (std::vector::iterator it=m_vInRCFile.begin();it != m_vInRCFile.end();++it) { CString strLine = *it; strLine.Trim(); + int iPos = 0; if ( (iPos=strLine.Find(_T(" MENU"))) >= 0 && iPos == (strLine.GetLength() - (int)_tcslen(_T(" MENU"))) ) { // add the line to the output rc with no change @@ -533,7 +532,7 @@ UINT uiID = GetResourceID(strLine.Left(iPos)); // begin enumerating items - it++; + ++it; // process the menu ProcessMenu(uiID, &it); @@ -545,17 +544,20 @@ UINT uiID = GetResourceID(strLine.Left(iPos)); // begin processing dialog template - it++; + ++it; ProcessDialog(uiID, &it); } else if ( (iPos=strLine.Find(_T("STRINGTABLE"))) >= 0 && iPos == (strLine.GetLength() - (int)_tcslen(_T("STRINGTABLE")))) { // begin of the string table - it++; + ++it; ProcessStringTable(0, &it); } else m_vOutRCFile.push_back(*it); + + if(it == m_vInRCFile.end()) + break; } return true;