Kaydet (Commit) 614e0401 authored tarafından Michael Stahl's avatar Michael Stahl

codemaker: fix invalid string index access

Change-Id: Icca819484e751864d146a893fe78e8ef2c36363b
üst 10dc6605
......@@ -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] != '/')
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment