1
0
mirror of https://github.com/woo-j/zint.git synced 2024-12-23 13:33:55 +03:00

raster.c: fix clang garbage value warning

This commit is contained in:
gitlost 2021-09-27 11:11:22 +01:00
parent eb6e5daa2d
commit e8b1f7a12e

View File

@ -1282,7 +1282,7 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl
for (r = 0; r < scale_height; r++) { for (r = 0; r < scale_height; r++) {
size_t scaled_row = r * scale_width; size_t scaled_row = r * scale_width;
size_t image_row = (size_t) stripf(r / scaler) * image_width; size_t image_row = (size_t) stripf(r / scaler) * image_width;
if (image_row && (image_row == prev_image_row if (r && (image_row == prev_image_row
|| memcmp(pixelbuf + image_row, pixelbuf + prev_image_row, image_width) == 0)) { || memcmp(pixelbuf + image_row, pixelbuf + prev_image_row, image_width) == 0)) {
memcpy(scaled_pixelbuf + scaled_row, scaled_pixelbuf + scaled_row - scale_width, scale_width); memcpy(scaled_pixelbuf + scaled_row, scaled_pixelbuf + scaled_row - scale_width, scale_width);
} else { } else {