qbism / q2tools-220

Quake 2 map compiler tools with v220 map support, automatic phong, enhancements, and fixes.
GNU General Public License v2.0
61 stars 20 forks source link

PAK reading issue (platform-specific) #30

Closed RaZeR-RBI closed 1 year ago

RaZeR-RBI commented 1 year ago

TryLoadFileFromPak fails for me because on my machine size of pakheader_t and pakentry_t structs is wrong due to long being 8 byte long instead of 4 (ref), which causes wrong data being read and malloc failing because of that. Changing long to uint32_t in these structs fixes the issue.

qbism commented 1 year ago

Good catch. I will search for other long in source and replace