coverity#1325059 Argument cannot be negative bodge

Change-Id: I9bae22c7420247a26f0fe73e6c4e590471f19b0e
This commit is contained in:
Caolán McNamara
2015-09-29 12:09:33 +01:00
parent 4fd693f718
commit d62dddd634

View File

@@ -689,6 +689,12 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector<int> & rDelt
for (int i = startGi; i < endGi; ++i) for (int i = startGi; i < endGi; ++i)
{ {
if (i < 0)
{
SAL_WARN( "vcl.gdi", "Negative index" );
continue;
}
// calculate visual cluster bounds // calculate visual cluster bounds
int firstChar = mvGlyph2Char[i]; int firstChar = mvGlyph2Char[i];
int nBaseGlyph = mvChar2BaseGlyph[firstChar - mnMinCharPos]; int nBaseGlyph = mvChar2BaseGlyph[firstChar - mnMinCharPos];