Correctly setting default alpha channel values for non RLE-compressed RGB psds.

pull/174/head
Nick V 2015-09-13 12:02:08 +01:00
parent 7ac0f9c9b0
commit 69a85031a4
1 changed files with 1 additions and 1 deletions

View File

@ -5186,7 +5186,7 @@ static stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int
stbi_uc *p;
p = out + channel;
if (channel > channelCount) {
if (channel >= channelCount) {
// Fill this channel with default data.
for (i = 0; i < pixelCount; i++, p += 4)
*p = channel == 3 ? 255 : 0;