Skip to content

Commit 891cee8

Browse files
committed
Silence a compiler warning
Signed-off-by: falkTX <[email protected]>
1 parent 3496139 commit 891cee8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dgl/src/nanovg/stb_image.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4395,7 +4395,7 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
43954395
if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG");
43964396
if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG");
43974397
has_trans = 1;
4398-
for (k=0; k < s->img_n; ++k)
4398+
for (k=0; k < s->img_n && k < 3; ++k)
43994399
tc[k] = (stbi_uc) (stbi__get16be(s) & 255) * stbi__depth_scale_table[depth]; // non 8-bit images will be larger
44004400
}
44014401
break;

0 commit comments

Comments
 (0)