summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-09-09 10:46:03 +0100
committerNoel Power <noel.power@suse.com>2012-09-10 11:15:22 +0100
commit986a0f4eabae324091434c2670bb9592fadc1536 (patch)
tree6b1a20e8f8b3bcc77f05a77ad92f65e6549525ff /basic
parenta93e92ba707bd5a4ad41134d986f185c7ac16c06 (diff)
fdo#54718 fix opcode detection in basic resulting in failed/unregcognized code
fix is followup to bf5b493104d2dd4ab964f1fcb845200eaefbbcd5 which didn't adjust the runtime to cater for the new enum layout Change-Id: I6613fb8aacd8a70947c4fff556fb3e2d33c1113e
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/runtime.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 803fb85b0585..0a19676debf9 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -702,17 +702,17 @@ bool SbiRuntime::Step()
SbiOpcode eOp = (SbiOpcode ) ( *pCode++ );
sal_uInt32 nOp1, nOp2;
- if (eOp < SbOP0_END)
+ if (eOp <= SbOP0_END)
{
(this->*( aStep0[ eOp ] ) )();
}
- else if (eOp >= SbOP1_START && eOp < SbOP1_END)
+ else if (eOp >= SbOP1_START && eOp <= SbOP1_END)
{
nOp1 = *pCode++; nOp1 |= *pCode++ << 8; nOp1 |= *pCode++ << 16; nOp1 |= *pCode++ << 24;
(this->*( aStep1[ eOp - SbOP1_START ] ) )( nOp1 );
}
- else if (eOp >= SbOP2_START && eOp < SbOP2_END)
+ else if (eOp >= SbOP2_START && eOp <= SbOP2_END)
{
nOp1 = *pCode++; nOp1 |= *pCode++ << 8; nOp1 |= *pCode++ << 16; nOp1 |= *pCode++ << 24;
nOp2 = *pCode++; nOp2 |= *pCode++ << 8; nOp2 |= *pCode++ << 16; nOp2 |= *pCode++ << 24;