fix issue reported by msvc memory sanitiser

This commit is contained in:
Ondrej Novak 2025-02-15 13:10:17 +01:00
parent 075100d2ce
commit 14d1a4666d
3 changed files with 7 additions and 11 deletions

View file

@ -385,7 +385,7 @@ const void *load_mob_legacy_format(const void *p, int32_t *s) {
nx = offsetof(TMOB, dialog_flags);
memmove(d, c, nx - ofs);
c+=nx - ofs -1; //second padding 1
d+=nx;
d+=nx-ofs;
ofs=nx;
nx = sizeof(TMOB);
memmove(d, c, nx - ofs - 1); //last padding 1