diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-29 12:09:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-29 12:13:03 +0100 |
commit | d62dddd6345e8f1730eed1bb2b7183499a85133f (patch) | |
tree | ce719d6210b13d4da78029fa1b991ca6d8fc7578 | |
parent | 4fd693f718ac74115ea58208ac3427c01857d260 (diff) |
coverity#1325059 Argument cannot be negative bodge
Change-Id: I9bae22c7420247a26f0fe73e6c4e590471f19b0e
-rw-r--r-- | vcl/source/glyphs/graphite_layout.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 635417bba2db..10be4a0f3c20 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -689,6 +689,12 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector<int> & rDelt for (int i = startGi; i < endGi; ++i) { + if (i < 0) + { + SAL_WARN( "vcl.gdi", "Negative index" ); + continue; + } + // calculate visual cluster bounds int firstChar = mvGlyph2Char[i]; int nBaseGlyph = mvChar2BaseGlyph[firstChar - mnMinCharPos]; |