diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-11-06 17:37:42 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-11-07 01:34:33 +0100 |
commit | 614e04019a672cdd61b86699d99250d80f169f95 (patch) | |
tree | 71b1bf2f823961e9b811e45958e7390a3ef485d7 /codemaker | |
parent | 10dc66052ae1bd5f8ba4be1554ab9654d2af3e93 (diff) |
codemaker: fix invalid string index access
Change-Id: Icca819484e751864d146a893fe78e8ef2c36363b
Diffstat (limited to 'codemaker')
-rw-r--r-- | codemaker/source/codemaker/global.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx index d6c5a0fae942..ba3f42484d5a 100644 --- a/codemaker/source/codemaker/global.cxx +++ b/codemaker/source/codemaker/global.cxx @@ -87,8 +87,9 @@ OString createFileNameFromType( const OString& destination, length += prefix.getLength() + type.getLength() + postfix.getLength(); sal_Bool withSeparator = sal_False; - if (destination[destination.getLength()] != '\\' && - destination[destination.getLength()] != '/' && + if (!destination.isEmpty() && + destination[destination.getLength() - 1] != '\\' && + destination[destination.getLength() - 1] != '/' && type[0] != '\\' && type[0] != '/') { |