Merge branch 'fix-truncation' of https://github.com/sammyhw/stb into working

pull/362/merge
Sean Barrett 2017-01-15 23:58:26 -08:00
commit 28c24f7b83
1 changed files with 1 additions and 1 deletions

View File

@ -5722,7 +5722,7 @@ static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req
// Fill this channel with default data. // Fill this channel with default data.
if (bitdepth == 16 && bpc == 16) { if (bitdepth == 16 && bpc == 16) {
stbi__uint16 *q = ((stbi__uint16 *) out) + channel; stbi__uint16 *q = ((stbi__uint16 *) out) + channel;
stbi_uc val = channel == 3 ? 65535 : 0; stbi__uint16 val = channel == 3 ? 65535 : 0;
for (i = 0; i < pixelCount; i++, q += 4) for (i = 0; i < pixelCount; i++, q += 4)
*q = val; *q = val;
} else { } else {