Add missing address operator in cm_polylib.c
Also avoid nullptr dereference.
This commit is contained in:
1 parent
3a702ded65
commit
bf4c7a0341
1 file changed
+1
-1
@@ -276,7 +276,7 @@ winding_t *CopyWinding (winding_t *w)
|
||||
winding_t *c;
|
||||
|
||||
c = AllocWinding (w->numpoints);
|
||||
size = (intptr_t) ((winding_t *)0)->p[w->numpoints];
|
||||
size = (intptr_t)&(w->p[w->numpoints]) - (intptr_t)w;
|
||||
Com_Memcpy (c, w, size);
|
||||
return c;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user