dxx-rebirth/similar
Kp dfcb0fcdc1 Fix truncated polymodel data on words_need_alignment=1 systems
kajott reports that on Raspberry Pi systems, "Medium Hulk and Heavy Hulk
models were missing their heads".  This impacts all systems with
words_need_alignment=1, and was introduced by logic that tried to
truncate invalid polygon models, which was added because such models
often crashed the game.  The validation logic used the original size of
the polygon model data, which is correct on systems with
words_need_alignment=0, but can be too small on systems with
words_need_alignment=1 if the polygon model was enlarged as part of
aligning it.  Such systems would refuse to read past the original,
shorter, length, and then declare the model to be broken and truncate
it.  Fix this by reloading the length from the polymodel structure after
the alignment logic is applied.

Reported-by: kajott <https://github.com/dxx-rebirth/dxx-rebirth/pull/519>
Fixes: 42a2e3ab0b ("Avoid crash loading polymodels with invalid subcalls")
2020-07-05 23:34:33 +00:00
..
2d Move words_bigendian into if constexpr 2020-07-05 23:34:33 +00:00
3d Qualify uses of std::array 2020-05-02 21:18:42 +00:00
arch Move ogl_swap_buffers_internal to dcx 2020-07-05 23:34:32 +00:00
editor Replace uses of enumerate with zip where appropriate 2020-07-05 23:34:33 +00:00
main Fix truncated polymodel data on words_need_alignment=1 systems 2020-07-05 23:34:33 +00:00
misc Remove static inline declarations from fwd-partial_range.h 2020-06-10 02:25:32 +00:00