mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-21 19:51:27 +00:00
Made Lemon's dynamic stack size compatible with C++
This commit is contained in:
parent
370e53befe
commit
28e6477a03
1 changed files with 2 additions and 2 deletions
|
@ -296,10 +296,10 @@ static int yyGrowStack(yyParser *p){
|
|||
newSize = p->yystksz*2 + 100;
|
||||
idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
|
||||
if( p->yystack==&p->yystk0 ){
|
||||
pNew = malloc(newSize*sizeof(pNew[0]));
|
||||
pNew = (yyStackEntry *)malloc(newSize*sizeof(pNew[0]));
|
||||
if( pNew ) pNew[0] = p->yystk0;
|
||||
}else{
|
||||
pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
|
||||
pNew = (yyStackEntry *)realloc(p->yystack, newSize*sizeof(pNew[0]));
|
||||
}
|
||||
if( pNew ){
|
||||
p->yystack = pNew;
|
||||
|
|
Loading…
Reference in a new issue