zturtleman / mm3d

Maverick Model 3D is a 3D model editor and animator for games.
https://clover.moe/mm3d
GNU General Public License v2.0
114 stars 22 forks source link

mm3dfilter.cc uses "unsigned" to write some data #108

Closed m-7761 closed 4 years ago

m-7761 commented 4 years ago

https://github.com/zturtleman/mm3d/blob/f21f69ae33cbee6f3a93de83ac8f0765e059934c/src/libmm3d/mm3dfilter.cc#L3076

I don't know if this is the only case of this. The read routine uses uint32_t for this field. The skeleton block appears to do the same.

EDITED: On second thought this may not be a big deal but probably it should be changed anyway. (I was thinking some systems use 64bit int, but it's long that that is common, and 64bit int systems probably wouldn't compile but may not exist. (Definitely not for normal consumer hardware.))

zturtleman commented 4 years ago

Fixed in https://github.com/zturtleman/mm3d/commit/ebbf3bb1951aa5f7e3617a2bce208fb5bf98b91d. Thanks.

m-7761 commented 4 years ago

Thanks for hunting down additional fixes.

m-7761 commented 4 years ago

Unrelated, read bug: https://github.com/zturtleman/mm3d/blob/f21f69ae33cbee6f3a93de83ac8f0765e059934c/src/libmm3d/mm3dfilter.cc#L1572