Skip to content
This repository has been archived by the owner on Jan 19, 2025. It is now read-only.

Fix hash sorting for arks without root files #8

Open
PikminGuts92 opened this issue Aug 22, 2021 · 0 comments
Open

Fix hash sorting for arks without root files #8

PikminGuts92 opened this issue Aug 22, 2021 · 0 comments
Labels

Comments

@PikminGuts92
Copy link
Owner

Fix string sorting by hash in milo arks that don't contain files in root directory. The 0th slot should not be reserved for (empty) when no files are listed in root. Currently affects GH1.

Workaround for dir2ark, put a random file in the root directory of archive so game will successfully load ark.

// Prevents duplicate hashes
while (stringOffsets[hash] != 0)
{
hash++;
if (hash >= stringOffsets.Length) hash = 1; // Index of 0 is reserved for empty string
}

Caused by: cce8c0a

Expected
010Editor_5JsUfuDNND

Actual
010Editor_jfIHLO1Y1v

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant