[Libreoffice-commits] .: Branch 'libreoffice-3-5' - basic/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 11 03:08:35 PDT 2012


 basic/source/runtime/runtime.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a396652955a40f7e5f344c60a8f69e3bc52c747b
Author: Noel Power <noel.power at suse.com>
Date:   Sun Sep 9 10:46:03 2012 +0100

    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 at suse.cz>

diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 3b70b04..fd9b109 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;


More information about the Libreoffice-commits mailing list