Add missing address operator in cm_polylib.c

Also avoid nullptr dereference.
This commit is contained in:
Dominic Fandrey 2016-11-26 15:10:05 +01:00 committed by Zack Middleton
parent 3a702ded65
commit bf4c7a0341
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}