don't access the array before checking if the index is within the valid

2004-02-23  Simon Budig  <simon@gimp.org>

	* app/tools/gimpinktool-blob.c: don't access the array before
	checking if the index is within the valid bounds...
This commit is contained in:
Simon Budig
2004-02-23 20:12:35 +00:00
committed by Simon Budig
parent 02065884f2
commit 00c35dad74
3 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2004-02-23 Simon Budig <simon@gimp.org>
* app/tools/gimpinktool-blob.c: don't access the array before
checking if the index is within the valid bounds...
2004-02-23 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-snap.[ch]: return the snapped coordinates as

View File

@ -122,7 +122,7 @@ blob_fill (Blob *b,
/* find bottom of gap */
i2 = i1+2;
while (!(present[i2] & EDGE_LEFT) && i2 < b->height) i2++;
while (i2 < b->height && !(present[i2] & EDGE_LEFT)) i2++;
if (i2 < b->height)
{
@ -173,7 +173,7 @@ blob_fill (Blob *b,
/* find bottom of gap */
i2 = i1+2;
while (!(present[i2] & EDGE_RIGHT) && i2 < b->height) i2++;
while (i2 < b->height && !(present[i2] & EDGE_RIGHT)) i2++;
if (i2 < b->height)
{

View File

@ -122,7 +122,7 @@ blob_fill (Blob *b,
/* find bottom of gap */
i2 = i1+2;
while (!(present[i2] & EDGE_LEFT) && i2 < b->height) i2++;
while (i2 < b->height && !(present[i2] & EDGE_LEFT)) i2++;
if (i2 < b->height)
{
@ -173,7 +173,7 @@ blob_fill (Blob *b,
/* find bottom of gap */
i2 = i1+2;
while (!(present[i2] & EDGE_RIGHT) && i2 < b->height) i2++;
while (i2 < b->height && !(present[i2] & EDGE_RIGHT)) i2++;
if (i2 < b->height)
{