Explorar o código

Image: Fix typo at `_set_color_at_ofs` with `FORMAT_RGB565`

BlueCube3310 hai 5 meses
pai
achega
647b99c6d0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      core/io/image.cpp

+ 1 - 1
core/io/image.cpp

@@ -3331,7 +3331,7 @@ void Image::_set_color_at_ofs(uint8_t *ptr, uint32_t ofs, const Color &p_color)
 			uint16_t rgba = 0;
 			uint16_t rgba = 0;
 
 
 			rgba = uint16_t(CLAMP(p_color.r * 31.0, 0, 31));
 			rgba = uint16_t(CLAMP(p_color.r * 31.0, 0, 31));
-			rgba |= uint16_t(CLAMP(p_color.g * 63.0, 0, 33)) << 5;
+			rgba |= uint16_t(CLAMP(p_color.g * 63.0, 0, 63)) << 5;
 			rgba |= uint16_t(CLAMP(p_color.b * 31.0, 0, 31)) << 11;
 			rgba |= uint16_t(CLAMP(p_color.b * 31.0, 0, 31)) << 11;
 
 
 			((uint16_t *)ptr)[ofs] = rgba;
 			((uint16_t *)ptr)[ofs] = rgba;