summaryrefslogtreecommitdiff
path: root/vcl/source/window/mnemonic.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-21 09:53:57 +0200
committerNoel Grandin <noel@peralex.com>2013-10-23 13:12:55 +0200
commit8396cce9b5d9a4e3cdccc558eb1b818460f0987a (patch)
treec573d21f50405516245cbfc11630c589a098a855 /vcl/source/window/mnemonic.cxx
parent763114f8b7a7705e1b28226da33bf00016ad7982 (diff)
clean up places accessing the NULL at the of an OUString
There were only a couple of real bugs fixed, but we're a little bit safer now. This also fixes the assert and the comment in OUString::operator[] about this. Change-Id: Ibe16b5794e0ba7ecd345fa0801586d25b015974c
Diffstat (limited to 'vcl/source/window/mnemonic.cxx')
-rw-r--r--vcl/source/window/mnemonic.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx
index 0b55245d146b..fe45ae8928cd 100644
--- a/vcl/source/window/mnemonic.cxx
+++ b/vcl/source/window/mnemonic.cxx
@@ -208,14 +208,14 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString& _rKey )
}
// Search for next word
- do
+ nIndex++;
+ while ( nIndex < nLen )
{
- nIndex++;
c = aKey[ nIndex ];
if ( c == ' ' )
break;
+ nIndex++;
}
- while ( nIndex < nLen );
nIndex++;
}
while ( nIndex < nLen );