[fixed]CFileList::findFile() looks strange

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

[fixed]CFileList::findFile() looks strange

Post by Sylence »

Code: Select all

SFileListEntry entry;
entry.FullName = filename;
entry.IsDirectory = isDirectory;

// swap
entry.FullName.replace('\\', '/');

// remove trailing slash
if (entry.Name.lastChar() == '/')
{
	entry.IsDirectory = true;
	entry.Name[ entry.Name.size()-1] = 0;
	entry.Name.validate();
}
entry.Name is never assigned but is used...
Also the "swap" comment doesn't seem to belong there...
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Post Reply