[Libreoffice-commits] core.git: vcl/source

Faisal M. Al-Otaibi fmalotaibi at kacst.edu.sa
Tue Jun 25 03:56:08 PDT 2013


 vcl/source/window/builder.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b2d9ebf1b95867f7df335b74f3e3c5328647f34a
Author: Faisal M. Al-Otaibi <fmalotaibi at kacst.edu.sa>
Date:   Tue Jun 25 12:36:01 2013 +0200

    add safety check for '_' if had been put in the end of the text
    
    Change-Id: I7fae615f644158c9e5137330daa4873ad4192fd5

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index e79896e..4cc571f 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2201,7 +2201,7 @@ OString VclBuilder::convertMnemonicMarkup(const OString &rIn)
     OStringBuffer aRet(rIn);
     for (sal_Int32 nI = 0; nI < aRet.getLength(); ++nI)
     {
-        if (aRet[nI] == '_')
+        if (aRet[nI] == '_' && nI+1 < aRet.getLength())
         {
             if (aRet[nI+1] != '_')
                 aRet[nI] = MNEMONIC_CHAR;


More information about the Libreoffice-commits mailing list