Strip whitespace characters from .ign patterns

Fixes bug #15902.
This commit is contained in:
Ignacio R. Morelle 2010-04-18 02:54:32 +00:00
parent c806608b2b
commit 8a97d9f94d
2 changed files with 2 additions and 0 deletions

View File

@ -55,6 +55,7 @@ Version 1.9.0-svn:
* Fixed the ping timeout not waiting for the default ping interval when
ping timeout is not set to 0
* Fixed a bug in scoring of AI recall list. Patch by billynux.
* Strip whitespace characters from .ign patterns (bug #15902)
* Terrain animation related
* animated terrain animations are not synchronized anymore
* reworked macros to handle animations

View File

@ -216,6 +216,7 @@ static std::pair<std::vector<std::string>, std::vector<std::string> > read_ignor
std::istream *stream = istream_file(ign_file);
std::string line;
while (std::getline(*stream, line)) {
utils::strip(line);
const size_t l = line.size();
if (line[l - 1] == '/') { // directory; we strip the last /
patterns.second.push_back(line.substr(0, l - 1));