diff options
Diffstat (limited to 'Build/source/libs/potrace/potrace-src/src/greymap.c')
-rw-r--r-- | Build/source/libs/potrace/potrace-src/src/greymap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Build/source/libs/potrace/potrace-src/src/greymap.c b/Build/source/libs/potrace/potrace-src/src/greymap.c index 785774dd8da..0f97f12056e 100644 --- a/Build/source/libs/potrace/potrace-src/src/greymap.c +++ b/Build/source/libs/potrace/potrace-src/src/greymap.c @@ -845,11 +845,11 @@ static int gm_readbody_bmp(FILE *f, greymap_t **gmp) { x=0; y++; } - if (y>=bmpinfo.h) { + if (x>=bmpinfo.w || y>=bmpinfo.h) { break; } realheight = y+1; - GM_UPUT(gm, x, y, col[i&1]); + GM_PUT(gm, x, y, col[i&1]); x++; } } else if (c == 0) { @@ -875,7 +875,7 @@ static int gm_readbody_bmp(FILE *f, greymap_t **gmp) { x=0; y++; } - if (y>=bmpinfo.h) { + if (x>=bmpinfo.w || y>=bmpinfo.h) { break; } realheight = y+1; @@ -903,11 +903,11 @@ static int gm_readbody_bmp(FILE *f, greymap_t **gmp) { x=0; y++; } - if (y>=bmpinfo.h) { + if (x>=bmpinfo.w || y>=bmpinfo.h) { break; } realheight = y+1; - GM_UPUT(gm, x, y, COLTABLE(c)); + GM_PUT(gm, x, y, COLTABLE(c)); x++; } } else if (c == 0) { @@ -931,7 +931,7 @@ static int gm_readbody_bmp(FILE *f, greymap_t **gmp) { x=0; y++; } - if (y>=bmpinfo.h) { + if (x>=bmpinfo.w || y>=bmpinfo.h) { break; } realheight = y+1; |