diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-25 11:22:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-25 21:06:20 +0100 |
commit | 739adde53bf93afa1d1cd2ea2ecaf0754feec934 (patch) | |
tree | f30d730678c31b75c5fdc1f4b3258ef46069f6e4 /include/basebmp | |
parent | fdo#83067 also volatile cells need to listen to all references (diff) | |
download | core-739adde53bf93afa1d1cd2ea2ecaf0754feec934.tar.gz core-739adde53bf93afa1d1cd2ea2ecaf0754feec934.zip |
detect conditions where loop cannot logically end
Change-Id: I7e2ec1e09614510e6798ba8d5b9990c189a8dbb9
Diffstat (limited to 'include/basebmp')
-rw-r--r-- | include/basebmp/clippedlinerenderer.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/basebmp/clippedlinerenderer.hxx b/include/basebmp/clippedlinerenderer.hxx index acb9cdad48bc..077ff48255ab 100644 --- a/include/basebmp/clippedlinerenderer.hxx +++ b/include/basebmp/clippedlinerenderer.hxx @@ -269,6 +269,9 @@ void renderClippedLine( basegfx::B2IPoint aPt1, if( bUseAlternateBresenham ) { + if (rem < 0 && ady <= 0) + return; //break will never be hit under these circumstances + while(true) { acc.set(color, rowIter); @@ -347,6 +350,9 @@ void renderClippedLine( basegfx::B2IPoint aPt1, if( bUseAlternateBresenham ) { + if (rem < 0 && adx <= 0) + return; //break will never be hit under these circumstances + while(true) { acc.set(color, colIter); |