Skip to content

Commit 647b99c

Browse files
committed
Image: Fix typo at _set_color_at_ofs with FORMAT_RGB565
1 parent ba34829 commit 647b99c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/io/image.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3331,7 +3331,7 @@ void Image::_set_color_at_ofs(uint8_t *ptr, uint32_t ofs, const Color &p_color)
33313331
uint16_t rgba = 0;
33323332

33333333
rgba = uint16_t(CLAMP(p_color.r * 31.0, 0, 31));
3334-
rgba |= uint16_t(CLAMP(p_color.g * 63.0, 0, 33)) << 5;
3334+
rgba |= uint16_t(CLAMP(p_color.g * 63.0, 0, 63)) << 5;
33353335
rgba |= uint16_t(CLAMP(p_color.b * 31.0, 0, 31)) << 11;
33363336

33373337
((uint16_t *)ptr)[ofs] = rgba;

0 commit comments

Comments
 (0)