// exceeding the number of triangles in a single mesh) we have to make sure
// that we make only a single mesh - so over-estimate the size of the mesh
// to match the model.
- r_shadow_compilingrtlight->static_meshchain_shadow_shadowmap = Mod_ShadowMesh_Begin(r_main_mempool, model->surfmesh.num_vertices, model->surfmesh.num_triangles);
+ // bones_was_here: +128 works around BUG https://github.com/DarkPlacesEngine/darkplaces/issues/119
+ // +64 was enough to start the map without triggering ASan, +96 was enough to also edit the light.
+ // See also: warning in Mod_ShadowMesh_AddMesh
+ r_shadow_compilingrtlight->static_meshchain_shadow_shadowmap = Mod_ShadowMesh_Begin(r_main_mempool, model->surfmesh.num_vertices, model->surfmesh.num_triangles + 128);
R_Shadow_PrepareShadowSides(model->surfmesh.num_triangles);
for (surfacelistindex = 0;surfacelistindex < numsurfaces;surfacelistindex++)
{