Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant