We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c25935a commit c8df9d5Copy full SHA for c8df9d5
src/engine/virtualmachine.cpp
@@ -4,6 +4,7 @@
4
#include "../scratch/list.h"
5
#include "../engine/engine.h"
6
#include <iostream>
7
+#include <cassert>
8
9
#define MAX_REG_COUNT 1024
10
@@ -221,6 +222,7 @@ unsigned int *VirtualMachine::run(unsigned int *pos)
221
222
&&do_break_atomic,
223
&&do_warp
224
};
225
+ assert(pos);
226
unsigned int *loopStart;
227
unsigned int *loopEnd;
228
size_t loopCount;
src/engine/virtualmachine.h
@@ -147,7 +147,7 @@ class LIBSCRATCHCPP_EXPORT VirtualMachine
147
size_t index, max;
148
} Loop;
149
150
- unsigned int *m_bytecode;
+ unsigned int *m_bytecode = nullptr;
151
std::vector<unsigned int> m_bytecodeVector;
152
153
Target *m_target = nullptr;
0 commit comments