qdbusxml2cpp: Check string length before checking for \r\n.
Change-Id: I5370bae258933536ecf9785da95a9006fafc1a62 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
afa57146cb
commit
e2fb3f94e8
@ -498,7 +498,7 @@ static QString stringify(const QString &data)
|
||||
retval += QLatin1String("\\\"");
|
||||
else
|
||||
retval += data[i];
|
||||
if (data[i] == QLatin1Char('\r') && data[i+1] == QLatin1Char('\n'))
|
||||
if (i+1 < data.length() && data[i] == QLatin1Char('\r') && data[i+1] == QLatin1Char('\n'))
|
||||
i++;
|
||||
retval += QLatin1String("\\n\"\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user