]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commit
Fix number of bytes to be zeroed when spawn entity
authorDimitrian <dimitrian.tkachenko@gmail.com>
Tue, 7 Feb 2023 21:12:29 +0000 (16:12 -0500)
committerDimitrian <dimitrian.tkachenko@gmail.com>
Tue, 7 Feb 2023 21:12:29 +0000 (16:12 -0500)
commit8aa262081d3a0837d15616e7cf82d2e1bb2745ca
treeaf3640382b97a92be25410a7684fac9d2e8938f9
parent297eab9e5e2c9cc4f41201b68821593a5cf9a725
Fix number of bytes to be zeroed when spawn entity

In `qcvm` when zeroing memory for new entitydata wrong number of bytes used.
This leads to crash with the error:`malloc(): invalid size (unsorted)`.

Use `prog->entityfields * sizeof(qcint_t)`
instead of `sz * sizeof(qcint_t)`.
exec.cpp