diff options
Diffstat (limited to 'Build/source/libs/potrace/potrace-src/src/bitmap_io.c')
-rw-r--r-- | Build/source/libs/potrace/potrace-src/src/bitmap_io.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Build/source/libs/potrace/potrace-src/src/bitmap_io.c b/Build/source/libs/potrace/potrace-src/src/bitmap_io.c index 26c532e2b3c..f965b733212 100644 --- a/Build/source/libs/potrace/potrace-src/src/bitmap_io.c +++ b/Build/source/libs/potrace/potrace-src/src/bitmap_io.c @@ -689,11 +689,11 @@ static int bm_readbody_bmp(FILE *f, double threshold, potrace_bitmap_t **bmp) { x=0; y++; } - if (y>=bmpinfo.h) { + if (x>=bmpinfo.w || y>=bmpinfo.h) { break; } realheight = y+1; - BM_UPUT(bm, x, y, col[i&1]); + BM_PUT(bm, x, y, col[i&1]); x++; } } else if (c == 0) { @@ -719,7 +719,7 @@ static int bm_readbody_bmp(FILE *f, double threshold, potrace_bitmap_t **bmp) { x=0; y++; } - if (y>=bmpinfo.h) { + if (x>=bmpinfo.w || y>=bmpinfo.h) { break; } realheight = y+1; @@ -747,11 +747,11 @@ static int bm_readbody_bmp(FILE *f, double threshold, potrace_bitmap_t **bmp) { x=0; y++; } - if (y>=bmpinfo.h) { + if (x>=bmpinfo.w || y>=bmpinfo.h) { break; } realheight = y+1; - BM_UPUT(bm, x, y, COLTABLE(c)); + BM_PUT(bm, x, y, COLTABLE(c)); x++; } } else if (c == 0) { @@ -775,7 +775,7 @@ static int bm_readbody_bmp(FILE *f, double threshold, potrace_bitmap_t **bmp) { x=0; y++; } - if (y>=bmpinfo.h) { + if (x>=bmpinfo.w || y>=bmpinfo.h) { break; } realheight = y+1; |