Index: src/rc2lng/rc.cpp =================================================================== diff -u -N -red956c8a521a0151f87745915d9bf8ea123fd6f7 -r2ea239cf20965118cf7bca9a48c2cec670be5738 --- src/rc2lng/rc.cpp (.../rc.cpp) (revision ed956c8a521a0151f87745915d9bf8ea123fd6f7) +++ src/rc2lng/rc.cpp (.../rc.cpp) (revision 2ea239cf20965118cf7bca9a48c2cec670be5738) @@ -522,30 +522,33 @@ std::vector vStrTable; for (std::vector::iterator it=m_vInRCFile.begin();it != m_vInRCFile.end();it++) { - if ( (iPos=it->Find(_T(" MENU "))) != -1 ) + CString strLine = *it; + strLine.Trim(); + + if ( (iPos=strLine.Find(_T(" MENU"))) == (strLine.GetLength() - (int)_tcslen(_T(" MENU"))) ) { // add the line to the output rc with no change m_vOutRCFile.push_back(*it); - UINT uiID = GetResourceID(it->Left(iPos)); + UINT uiID = GetResourceID(strLine.Left(iPos)); // begin enumerating items it++; // process the menu ProcessMenu(uiID, &it); } - else if ( (iPos=it->Find(_T(" DIALOGEX "))) != -1) + else if ( (iPos=strLine.Find(_T(" DIALOGEX "))) != -1) { // add the line to the output rc with no change m_vOutRCFile.push_back(*it); - UINT uiID = GetResourceID(it->Left(iPos)); + UINT uiID = GetResourceID(strLine.Left(iPos)); // begin processing dialog template it++; ProcessDialog(uiID, &it); } - else if ( (iPos=it->Find(_T("STRINGTABLE "))) != -1) + else if ( (iPos=strLine.Find(_T("STRINGTABLE"))) == (strLine.GetLength() - (int)_tcslen(_T("STRINGTABLE")))) { // begin of the string table it++;