--- AE/Installer/trunk/source/installer.cpp 2010/02/22 00:00:55 496 +++ AE/Installer/trunk/source/installer.cpp 2010/03/03 02:09:02 499 @@ -939,6 +939,7 @@ bool ReadInstallInfoCfg(fstream *fileHan while (getline(*fileHandler, line)) { + StripNewlines(&line); tokenize(line, tokens); iter = tokens.begin(); @@ -1470,6 +1471,17 @@ void tokenize(const string& str, vector< } } +/* StripNewlines() gets rids of any linebreaks that come from text returned by getline(); \ +| getline() should be stripping those out, but Windows CR/LF files seem to be sneaking | +\ some extra return characters into strings in the ReadInstallInfoCfg() function. */ +void StripNewlines(string *theLine) +{ + int deleteFromHere = 0; + deleteFromHere = theLine->find("\r"); + if (deleteFromHere > 0) + theLine->erase(deleteFromHere, theLine->size()); +} + void clearOldDats(void) { directory_iterator end_iter_gdf; for ( directory_iterator dir_itr_gdf( "../GameDataFolder" );