JUtility matching for debug (#3074)

* Jut cleanup work

* data section fix

* match the last of JUtility

* added more helpful comment

* Add missed null terminator

* do while -> while loop

* replace more do whiles

* Fix wii regression

* Add suggestions

* fix null check

---------

Co-authored-by: roeming <roeming@users.noreply.github.com>
This commit is contained in:
roeming
2026-01-28 22:38:20 -05:00
committed by GitHub
parent 13d3ae312a
commit 4e8adeef59
19 changed files with 341 additions and 251 deletions
+4 -3
View File
@@ -19,11 +19,12 @@ void* JUTResReference::getResource(JSUInputStream* stream, u32 resType, JKRArchi
void* JUTResReference::getResource(const void* data, u32 resType, JKRArchive* archive) {
mType = *(u8*)data;
mNameLength = *((u8*)data + 1);
const u8* pData = (const u8*)data;
mType = pData[0];
mNameLength = pData[1];
if (mNameLength != 0) {
memcpy(&mName, &((u8*)data)[2], mNameLength);
memcpy(&mName, &pData[2], mNameLength);
}
if (mType == RESTYPE_Unk2 || mType == RESTYPE_Unk3 || mType == RESTYPE_Unk4) {