summaryrefslogtreecommitdiffstats
path: root/ue3/mycpu/cinstruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ue3/mycpu/cinstruction.cpp')
-rw-r--r--ue3/mycpu/cinstruction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/ue3/mycpu/cinstruction.cpp b/ue3/mycpu/cinstruction.cpp
index 5c1bd5c..a766015 100644
--- a/ue3/mycpu/cinstruction.cpp
+++ b/ue3/mycpu/cinstruction.cpp
@@ -8,6 +8,7 @@
8#include <sstream> 8#include <sstream>
9#include <stdexcept> 9#include <stdexcept>
10#include <boost/lexical_cast.hpp> 10#include <boost/lexical_cast.hpp>
11#include <assert.h>
11#include "cinstruction.h" 12#include "cinstruction.h"
12#include "ccpu.h" 13#include "ccpu.h"
13 14
@@ -35,6 +36,7 @@ const unsigned CInstruction::parseRegister(const std::string& str)
35 36
36inline void CInstruction::checkRegister(CCPU *cpu, const unsigned regidx) 37inline void CInstruction::checkRegister(CCPU *cpu, const unsigned regidx)
37{ 38{
39 assert(cpu != NULL);
38 if (regidx >= cpu->getRegisterCount()) 40 if (regidx >= cpu->getRegisterCount())
39 { 41 {
40 stringstream sstr; 42 stringstream sstr;