VendorPC / NARCTool

a Refined and Streamlined version of NARCTool.
https://discordapp.com/invite/fhAVaJS?utm_source=share&utm_medium=ios_app&utm_name=iossmf
2 stars 1 forks source link

NARCTool 4.0 Issue on different system #2

Open Ukalus opened 10 months ago

Ukalus commented 10 months ago

Heyo im having some problems running this tool on my system:

I have limited the the possible error to coming from some of the struct format strings not having the < on them This leads to struct.calcsize("LLL") not returning a big enough size

https://docs.python.org/3/library/struct.html <-- this mentions that if no character is specified @ is assumed which is native byte order

This seems like a non issue as most systems use little endian anyway, but @ also specifies to use native size and native alignment

This native size and alignment seem to be different depending on the compiler which is why i think it broke on my end

i've added the < symbols everywhere where there were none but now its cutting the files weirdly

the first file: image

in this line: fimg_offset = narc_file.tell() + 0x8 when increasing 0x8 it eventually cuts the files the right way

gcc version 13.2.1 20230801 (GCC) OS: Manjaro Linux x86_64 CPU: AMD Ryzen 5 3600X (12) @ 3.800GHz

Ukalus commented 10 months ago

Oh yeah and the weird offset is always different