mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-11 05:04:40 -04:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user