mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:20:51 +01:00
[PR #718] mods: hash a mod.json name as hashdict.joaat does (OLD-10050) #757
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#757
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/718
Author: @abnalstlll-byte
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:restore/old-10050-mods-joaat-latin1📝 Commits (1)
182e0bbmods: hash a mod.json name as hashdict.joaat does (lower-cased Latin-1, not UTF-8 bytes)📊 Changes
2 files changed (+63 additions, -5 deletions)
View changed files
📝
runtime/src/mods.h(+48 -5)📝
runtime/test/mods_test.cpp(+15 -0)📄 Description
### Summary
Restores old upstream PR 10050 (OLD-10050, replaces draft #316) with original author attribution (@Conrage) preserved.
gta6rt'smods::joaatpreviously hashed the UTF-8 bytes of amod.jsonname and only lower-cased ASCII. Consequently, non-ASCII names in an archetype swap produced a hash that differed fromtools/hashdict.py(enforced bytests/test_joaat_agreement.py), causing swaps to silently miss their target.This change decodes the UTF-8, applies lowercase normalization across Latin-1 code points, and hashes the Latin-1 bytes with '?' fallback, aligning C++
constexpr mods::joaatwithhashdict.joaat.Verification
static_asserts inruntime/test/mods_test.cppcovering accented Latin-1, ligatures, and CJK characters.python -I scripts/check_no_game_data.pyclean (0 issues).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.