Fix for borland famous alloca-bug.

This commit is contained in:
Dabb 2001-01-12 13:31:43 +00:00
parent 21759c69b3
commit df7e9b9a14

View file

@ -281,6 +281,14 @@ insert_cube_vertices (struct box_def *box, struct visit_def visit, int count,
int face = visit.face;
int ind = visit.leave + 1;
#ifdef __BORLANDC__
// This is fix for borland alloca "feature" which fails to restore stack
// correcly if calling function doesn't have any references to local variables.
char dummy[5];
dummy[0]=0;
#endif
va_start (args, count);
v = (vec3_t **) alloca (count * sizeof (vec3_t *));