Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/stb_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -5335,7 +5335,7 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw,
stbi__create_png_alpha_expand8(dest, dest, x, img_n);
} else if (depth == 8) {
if (img_n == out_n)
memcpy(dest, cur, x * img_n);
memcpy(dest, cur, (size_t) x * (size_t) img_n);
else
stbi__create_png_alpha_expand8(dest, cur, x, img_n);
} else if (depth == 16) {
Expand Down
Loading