summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorFaisal M. Al-Otaibi <fmalotaibi@kacst.edu.sa>2013-06-25 12:36:01 +0200
committerFaisal M. Al-Otaibi <fmalotaibi@kacst.edu.sa>2013-06-25 12:55:25 +0200
commitb2d9ebf1b95867f7df335b74f3e3c5328647f34a (patch)
tree7b0e33ffe15519dc919cafcfa2cddca649acaa24 /vcl
parentDocxAttributeOutput: -Werror=unused-macros, -Werror=sign-compare (diff)
downloadcore-b2d9ebf1b95867f7df335b74f3e3c5328647f34a.tar.gz
core-b2d9ebf1b95867f7df335b74f3e3c5328647f34a.zip
add safety check for '_' if had been put in the end of the text
Change-Id: I7fae615f644158c9e5137330daa4873ad4192fd5
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/builder.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index e79896e4d833..4cc571f21174 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;