Adjustments to wildcard engine

Fixed incorrect logic when checking at the end of the string - some of
the names had an added null character
Removed case sensitivity
This commit is contained in:
x1nixmzeng
2015-02-17 22:42:01 +00:00
parent 17bc561045
commit d091f12c81
4 changed files with 25 additions and 24 deletions

View File

@@ -166,7 +166,6 @@ bool GDFX::ReadEntry(ParseState& state, const uint8_t* buffer,
GDFXEntry* entry = new GDFXEntry();
entry->name = std::string(name, name_length);
entry->name.append(1, '\0');
entry->attributes = (X_FILE_ATTRIBUTES)attributes;
// Add to parent.

View File

@@ -213,7 +213,6 @@ STFS::Error STFS::ReadAllEntries(const uint8_t* map_ptr) {
auto entry = std::make_unique<STFSEntry>();
entry->name = std::string((char*)filename, filename_length_flags & 0x3F);
entry->name.append(1, '\0');
// bit 0x40 = consecutive blocks (not fragmented?)
if (filename_length_flags & 0x80) {
entry->attributes = X_FILE_ATTRIBUTE_DIRECTORY;