diff options
author | Noel Power <noel.power@suse.com> | 2012-09-09 10:46:03 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-09-11 12:07:24 +0200 |
commit | a396652955a40f7e5f344c60a8f69e3bc52c747b (patch) | |
tree | 3f3277d7d8592e1f406bea71f173c844c82292a9 | |
parent | 57ce0e13e9228868854749867109c9dbd5b60121 (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>
-rw-r--r-- | basic/source/runtime/runtime.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 3b70b04ccea2..fd9b1092c0f7 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; |