aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/laser.hpp4
-rw-r--r--src/core/vmrunner.cpp8
2 files changed, 8 insertions, 4 deletions
diff --git a/src/core/laser.hpp b/src/core/laser.hpp
new file mode 100644
index 0000000..2fac21c
--- /dev/null
+++ b/src/core/laser.hpp
@@ -0,0 +1,4 @@
+#ifndef LASER_H
+#define LASER_H
+
+#endif // LASER_H
diff --git a/src/core/vmrunner.cpp b/src/core/vmrunner.cpp
index 43fe1f5..1767cfa 100644
--- a/src/core/vmrunner.cpp
+++ b/src/core/vmrunner.cpp
@@ -18,11 +18,11 @@ Idata& blrScriptVM::fetchData(SPara para,bool forcerw)
{
case 0:
if(forcerw)throw;
- cret.i()=para.data.i;cret.type=0;
+ cret.D.d=para.data.d;cret.type=0;
return cret;
case 1:
if(forcerw)throw;
- cret.r()=para.data.r;cret.type=1;
+ cret.D.d=para.data.d;cret.type=1;
return cret;
case 2:
return ir[para.data.i];
@@ -274,7 +274,7 @@ void blrScriptVM::vmRunFunction(const char *fncnym)
if(fetchData(inst[cur].para1).nez())
{
lpjmp[lops]=cur;
- lppos[lops++]=fetchData(inst[cur].para2);
+ lppos[lops++]=fetchData(inst[cur].para2).i();
}
else cur=fetchData(inst[cur].para2).i()+1,jmp=1;
break;
@@ -287,7 +287,7 @@ void blrScriptVM::vmRunFunction(const char *fncnym)
cur=lppos[--lops],jmp=1;
break;
}
- if(cur==lppos[lops-1])cur=lpjmp[--lops],jmp=1;
+ if(lops&&cur==lppos[lops-1])cur=lpjmp[--lops],jmp=1;
if(!jmp)++cur;
}
}