codemaker: fix invalid string index access
Change-Id: Icca819484e751864d146a893fe78e8ef2c36363b
This commit is contained in:
parent
10dc66052a
commit
614e04019a
1 changed files with 3 additions and 2 deletions
|
@ -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] != '/')
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue