Skip to content

Commit 560ff9f

Browse files
committed
Compiler: Clear bytecode before compiling
1 parent ba73f67 commit 560ff9f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/engine/compiler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Compiler::Compiler(Engine *engine) :
1818
/*! Compiles the script. Use bytecode() to read the generated bytecode. */
1919
void Compiler::compile(std::shared_ptr<Block> topLevelBlock)
2020
{
21+
m_bytecode.clear();
2122
// Add start instruction
2223
addInstruction(OP_START);
2324

0 commit comments

Comments
 (0)