mirror of
https://github.com/zrax/pycdc.git
synced 2026-06-23 11:34:07 +00:00
Resize the stack if necessary when pushing.
This fixes a bunch of valgrind warnings and crashes.
This commit is contained in:
parent
b0769cf432
commit
ed1fefc205
1 changed files with 3 additions and 0 deletions
|
|
@ -27,6 +27,9 @@ public:
|
|||
}
|
||||
|
||||
void push(PycRef<ASTNode> node) {
|
||||
if (m_size == m_ptr + 1) {
|
||||
grow(1);
|
||||
}
|
||||
m_stack[++m_ptr] = node;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue