summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-09-09 10:46:03 +0100
committerPetr Mladek <pmladek@suse.cz>2012-09-11 12:02:55 +0200
commit3e27d06e44a7e5268558fc06e9cf45ef3405ffd1 (patch)
treecc60424418b65c33ce38fba9daf59e76f5261784 /basic
parentb6cb9214324cb9f56d07aeb1e297d2d574bba4e6 (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 Signed-off-by: Petr Mladek <pmladek@suse.cz>
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 281f0a9990b0..4f1cba24de60 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -711,17 +711,17 @@ sal_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;