Resize the stack if necessary when pushing.
This fixes a bunch of valgrind warnings and crashes.
This commit is contained in:
@@ -27,6 +27,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void push(PycRef<ASTNode> node) {
|
void push(PycRef<ASTNode> node) {
|
||||||
|
if (m_size == m_ptr + 1) {
|
||||||
|
grow(1);
|
||||||
|
}
|
||||||
m_stack[++m_ptr] = node;
|
m_stack[++m_ptr] = node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user