I noticed that Mod_LoadMarksurfaces can potentially perform an unaligned access. See this comment for details:
andrei-drexler#570 (comment)
Corresponding part of the code
short *in = (short *)(mod_base + l->fileofs);
if ((uintptr_t)in & 1)
__debugbreak();
As far as I understand, this is UB (at least), and I tried to port Novum's fix Novum/vkQuake@c1b0234 in case you're interested.
andrey-budko@f61f19f
I did all the changes by hand, so be careful and recheck it in case you are interested in such huge changes. Most changes are fairly trivial, but Mod_LoadTextures required extra care as the code differs significantly.
I noticed that Mod_LoadMarksurfaces can potentially perform an unaligned access. See this comment for details:
andrei-drexler#570 (comment)
Corresponding part of the code
As far as I understand, this is UB (at least), and I tried to port Novum's fix Novum/vkQuake@c1b0234 in case you're interested.
andrey-budko@f61f19f
I did all the changes by hand, so be careful and recheck it in case you are interested in such huge changes. Most changes are fairly trivial, but
Mod_LoadTexturesrequired extra care as the code differs significantly.