mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-01-22 16:01:25 +00:00
Fix for borland famous alloca-bug.
This commit is contained in:
parent
21759c69b3
commit
df7e9b9a14
1 changed files with 8 additions and 0 deletions
|
@ -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 *));
|
||||
|
||||
|
|
Loading…
Reference in a new issue